CVE-2024-24557: CWE-346: Origin Validation Error in moby moby
Moby is an open-source project created by Docker to enable software containerization. The classic builder cache system is prone to cache poisoning if the image is built FROM scratch. Also, changes to some instructions (most important being HEALTHCHECK and ONBUILD) would not cause a cache miss. An attacker with the knowledge of the Dockerfile someone is using could poison their cache by making them pull a specially crafted image that would be considered as a valid cache candidate for some build steps. 23.0+ users are only affected if they explicitly opted out of Buildkit (DOCKER_BUILDKIT=0 environment variable) or are using the /build API endpoint. All users on versions older than 23.0 could be impacted. Image build API endpoint (/build) and ImageBuild function from github.com/docker/docker/client is also affected as it the uses classic builder by default. Patches are included in 24.0.9 and 25.0.2 releases.
AI Analysis
Technical Summary
CVE-2024-24557 is a medium-severity vulnerability affecting the Moby project, an open-source containerization platform developed by Docker. The vulnerability arises from an origin validation error in Moby's classic builder cache system, specifically when building container images FROM scratch. The core issue is cache poisoning: an attacker who knows the Dockerfile used in a build can craft a malicious image that the builder cache mistakenly accepts as a valid cache candidate for certain build steps. This occurs because changes to some Dockerfile instructions, notably HEALTHCHECK and ONBUILD, do not trigger a cache miss, allowing stale or malicious cache entries to be reused. The vulnerability affects all Moby versions prior to 24.0.9 and versions between 25.0.0 and 25.0.2. Users running version 23.0 or later are only vulnerable if they have explicitly disabled BuildKit (by setting DOCKER_BUILDKIT=0) or are using the legacy /build API endpoint or the ImageBuild function from the Docker client library, which defaults to the classic builder. The BuildKit builder, which is the default in newer versions, is not affected. Exploiting this vulnerability requires local access or the ability to influence the image build process, as the CVSS vector indicates local attack vector with high attack complexity, no privileges required, but user interaction is necessary. The impact includes potential integrity compromise of container images, as poisoned cache entries could lead to execution of malicious code within containers. Confidentiality impact is low, but integrity is high, and availability impact is low. No known exploits are currently reported in the wild. Patches addressing this issue are included in Moby releases 24.0.9 and 25.0.2.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the integrity of containerized applications, especially in environments where container images are built frequently and from scratch. Poisoned caches could lead to deployment of compromised containers, potentially allowing attackers to execute arbitrary code within the container environment. This could lead to lateral movement within internal networks, data tampering, or disruption of services. Organizations relying on older Moby versions or those that have disabled BuildKit for compatibility reasons are particularly at risk. Given the widespread adoption of Docker and Moby in European enterprises, especially in sectors like finance, manufacturing, and critical infrastructure, the threat could impact supply chain security and operational continuity. The requirement for user interaction and local access somewhat limits remote exploitation, but insider threats or compromised developer environments could be vectors. The medium severity rating reflects the balance between impact and exploitation complexity, but the potential for integrity breaches in production environments makes it a concern for security teams.
Mitigation Recommendations
European organizations should take the following specific actions: 1) Upgrade Moby installations to version 24.0.9 or later, or 25.0.2 or later, to ensure patches are applied. 2) Avoid disabling BuildKit unless absolutely necessary; if BuildKit must be disabled, implement strict access controls around the build environment and the /build API endpoint. 3) Audit and monitor usage of the ImageBuild function from the Docker client library to detect legacy builder usage. 4) Implement strict validation and scanning of container images before deployment, including verifying image provenance and integrity. 5) Educate developers and DevOps teams about the risks of cache poisoning and encourage secure Dockerfile practices, such as minimizing use of instructions that do not trigger cache misses. 6) Employ runtime security tools to detect anomalous container behavior that could indicate exploitation. 7) Restrict build environment access to trusted personnel and systems to reduce the risk of malicious cache poisoning attempts. 8) Integrate container build processes with CI/CD pipelines that enforce security checks and use BuildKit by default.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2024-24557: CWE-346: Origin Validation Error in moby moby
Description
Moby is an open-source project created by Docker to enable software containerization. The classic builder cache system is prone to cache poisoning if the image is built FROM scratch. Also, changes to some instructions (most important being HEALTHCHECK and ONBUILD) would not cause a cache miss. An attacker with the knowledge of the Dockerfile someone is using could poison their cache by making them pull a specially crafted image that would be considered as a valid cache candidate for some build steps. 23.0+ users are only affected if they explicitly opted out of Buildkit (DOCKER_BUILDKIT=0 environment variable) or are using the /build API endpoint. All users on versions older than 23.0 could be impacted. Image build API endpoint (/build) and ImageBuild function from github.com/docker/docker/client is also affected as it the uses classic builder by default. Patches are included in 24.0.9 and 25.0.2 releases.
AI-Powered Analysis
Technical Analysis
CVE-2024-24557 is a medium-severity vulnerability affecting the Moby project, an open-source containerization platform developed by Docker. The vulnerability arises from an origin validation error in Moby's classic builder cache system, specifically when building container images FROM scratch. The core issue is cache poisoning: an attacker who knows the Dockerfile used in a build can craft a malicious image that the builder cache mistakenly accepts as a valid cache candidate for certain build steps. This occurs because changes to some Dockerfile instructions, notably HEALTHCHECK and ONBUILD, do not trigger a cache miss, allowing stale or malicious cache entries to be reused. The vulnerability affects all Moby versions prior to 24.0.9 and versions between 25.0.0 and 25.0.2. Users running version 23.0 or later are only vulnerable if they have explicitly disabled BuildKit (by setting DOCKER_BUILDKIT=0) or are using the legacy /build API endpoint or the ImageBuild function from the Docker client library, which defaults to the classic builder. The BuildKit builder, which is the default in newer versions, is not affected. Exploiting this vulnerability requires local access or the ability to influence the image build process, as the CVSS vector indicates local attack vector with high attack complexity, no privileges required, but user interaction is necessary. The impact includes potential integrity compromise of container images, as poisoned cache entries could lead to execution of malicious code within containers. Confidentiality impact is low, but integrity is high, and availability impact is low. No known exploits are currently reported in the wild. Patches addressing this issue are included in Moby releases 24.0.9 and 25.0.2.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the integrity of containerized applications, especially in environments where container images are built frequently and from scratch. Poisoned caches could lead to deployment of compromised containers, potentially allowing attackers to execute arbitrary code within the container environment. This could lead to lateral movement within internal networks, data tampering, or disruption of services. Organizations relying on older Moby versions or those that have disabled BuildKit for compatibility reasons are particularly at risk. Given the widespread adoption of Docker and Moby in European enterprises, especially in sectors like finance, manufacturing, and critical infrastructure, the threat could impact supply chain security and operational continuity. The requirement for user interaction and local access somewhat limits remote exploitation, but insider threats or compromised developer environments could be vectors. The medium severity rating reflects the balance between impact and exploitation complexity, but the potential for integrity breaches in production environments makes it a concern for security teams.
Mitigation Recommendations
European organizations should take the following specific actions: 1) Upgrade Moby installations to version 24.0.9 or later, or 25.0.2 or later, to ensure patches are applied. 2) Avoid disabling BuildKit unless absolutely necessary; if BuildKit must be disabled, implement strict access controls around the build environment and the /build API endpoint. 3) Audit and monitor usage of the ImageBuild function from the Docker client library to detect legacy builder usage. 4) Implement strict validation and scanning of container images before deployment, including verifying image provenance and integrity. 5) Educate developers and DevOps teams about the risks of cache poisoning and encourage secure Dockerfile practices, such as minimizing use of instructions that do not trigger cache misses. 6) Employ runtime security tools to detect anomalous container behavior that could indicate exploitation. 7) Restrict build environment access to trusted personnel and systems to reduce the risk of malicious cache poisoning attempts. 8) Integrate container build processes with CI/CD pipelines that enforce security checks and use BuildKit by default.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2024-01-25T15:09:40.208Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682cd0fb1484d88663aec583
Added to database: 5/20/2025, 6:59:07 PM
Last enriched: 7/6/2025, 9:54:35 AM
Last updated: 8/14/2025, 8:50:03 AM
Views: 11
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.