Hex
Lockfile checksums not verified in Hex allows dependency integrity bypass
Insufficient Verification of Data Authenticity vulnerability in hexpm hex (Hex.RemoteConverger module) allows dependency integrity bypass via unverified lockfile checksums. Hex stores checksums for dependencies in the mix.lock file to ensure reproducible and integrity-checked builds. However, Hex.RemoteConverger.verify_resolved/2 never executes checksum verification because the lock data returned by Hex.Utils.lock/1 uses string-based dependency names, while the verification logic compares against atom-based names. This type mismatch causes the verification code path to be silently skipped. Checksums are still validated when packages are initially downloaded from the registry, but mismatches between the lockfile and resolved dependencies are not detected. An attacker who can influence cached packages (e.g., via local cache poisoning or a compromised registry) can provide modified dependency contents that will be accepted without detection. The mix.lock file is silently rewritten with the checksum values from the registry, erasing evidence of tampering. This issue affects hex: from 0.16.0 before 2.4.2.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.16.0, < 2.4.2
Fixed in 2.4.2
- >= e01576f28c64af9fae6eb17e2dad30f6efcb303c, < d7528c8199a1144511508bf3a6460026a5a14c8e
Fixed in d7528c8199a1144511508bf3a6460026a5a14c8e
Mitigation
Upgrade hex to 2.4.2 or later.
Upgrade hex to d7528c8199a1144511508bf3a6460026a5a14c8e or later.
References
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.