CVE-2025-54059

4.4 MEDIUM

📋 TL;DR

Melange versions 0.23.0 through 0.29.4 generate APK SBOM files with overly permissive 666 file permissions, allowing unprivileged users to modify these files. This could confuse security scanners or enable denial-of-service attacks in specific scenarios. Users building APK packages with affected melange versions are impacted.

💻 Affected Systems

Products:
  • melange
Versions: 0.23.0 through 0.29.4
Operating Systems: Linux, Any OS running melange
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where melange is used to build APK packages and those packages are deployed to running containers/images.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker modifies SBOM files to hide malicious packages or inject false vulnerability data, compromising supply chain integrity and security scanning accuracy.

🟠

Likely Case

Unauthorized modification of SBOM files causing confusion in security audits or triggering false alerts in vulnerability scanners.

🟢

If Mitigated

With proper file permissions controls and monitoring, impact is limited to potential DoS through file manipulation in specific edge cases.

🌐 Internet-Facing: LOW - This vulnerability primarily affects build systems and container images, not directly internet-exposed services.
🏢 Internal Only: MEDIUM - Internal build pipelines and container registries could be affected if attackers gain access to running images.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires local access to running containers/images with vulnerable APK packages and knowledge of file system operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.29.5

Vendor Advisory: https://github.com/chainguard-dev/melange/releases/tag/v0.29.5

Restart Required: No

Instructions:

1. Update melange to version 0.29.5 or later using package manager. 2. Rebuild any APK packages created with vulnerable versions. 3. Redeploy containers/images with updated packages.

🔧 Temporary Workarounds

Manual file permission correction

linux

Manually set correct permissions on SBOM files in deployed containers/images

chmod 644 /path/to/sbom/files/*.sbom

🧯 If You Can't Patch

  • Implement strict access controls on container runtime environments to limit unprivileged user access.
  • Monitor file integrity of SBOM files in production containers using tools like AIDE or file integrity monitoring solutions.

🔍 How to Verify

Check if Vulnerable:

Check melange version with 'melange version' and verify if between 0.23.0 and 0.29.4. Also check SBOM file permissions in built APKs.

Check Version:

melange version

Verify Fix Applied:

After updating to 0.29.5+, rebuild APK packages and verify SBOM files have 644 permissions instead of 666.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected modifications to .sbom files in container logs
  • File permission change alerts on SBOM files

Network Indicators:

  • N/A - Local file system vulnerability

SIEM Query:

source="container_runtime" AND (file_modification="*.sbom" OR file_permission_change="*.sbom")

🔗 References

📤 Share & Export