paragonie/sodium_compat is vulnerable to Improper Input Validation
48
Medium Risk
The library's Ed25519 public key validation contains two defects: the scalar multiplication helper does not update its accumulator inside the loop, and the main-subgroup predicate inverts its zero check. As a result, Ed25519 public keys carrying a torsion component pass validation during key-to-Curve25519 conversion, detached signature verification, and file signature verification, even though libsodium rejects them. Applications that accept user-supplied Ed25519 public keys can therefore process invalid subgroup elements. The fix corrects the subgroup predicate and the scalar multiplication state so mixed-order keys are rejected.
You are affected if you are using a version that falls within the vulnerable range and you accept user-supplied Ed25519 public keys for conversion or signature verification.
paragonie/sodium_compat is vulnerable to Improper Input Validation in versions 1.0.0 - 1.24.0 and 2.0.1 - 2.5.0.
Upgrade the paragonie/sodium_compat library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant