Intel

AIKIDO-2026-133621

paragonie/sodium_compat is vulnerable to Improper Input Validation

Improper Input ValidationGHSA-733q-f2wq-9c8w Published Yesterday

48

Medium Risk

This Affects:

PHPparagonie/sodium_compat
1.0.0 - 1.24.0
Fixed in 1.24.1
2.0.1 - 2.5.0
Fixed in 2.5.1
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

paragonie/sodium_compat is vulnerable to Improper Input Validation in versions 1.0.0 - 1.24.0 and 2.0.1 - 2.5.0.

How to fix this

Upgrade the paragonie/sodium_compat library to the patch version.