Security Advisories (1)
CVE-2026-30910 (2026-03-08)

Crypt::Sodium::XS versions through 0.001000 for Perl has potential integer overflows. Combined aead encryption, combined signature creation, and bin2hex functions do not check that output size will be less than SIZE_MAX, which could lead to integer wraparound causing an undersized output buffer. This can cause a crash in bin2hex and encryption algorithms other than aes256gcm. For aes256gcm encryption and signatures, an undersized buffer could lead to buffer overflow. Encountering this issue is unlikely as the message length would need to be very large. For bin2hex the input size would have to be > SIZE_MAX / 2 For aegis encryption the input size would need to be > SIZE_MAX - 32U For other encryption the input size would need to be > SIZE_MAX - 16U For signatures the input size would need to be > SIZE_MAX - 64U

Changes for version 0.001000

  • large re-factor (mostly just deduplication) of perl module code. one user-facing change: packages in the Crypt::Sodium::XS::OO:: namespace can no longer be imported directly. they really shouldn't have been previously, but it will no longer work. if any code was doing so, remove the "::OO" from the package name where it is imported (e.g., "use Crypt::Sodium::XS::OO::box" becomes "use Crypt::Sodium::XS::box") and no further changes are necessary.
  • bump libsodium to version 1.0.21-stable as of Jan 21
  • implement new ipcrypt feature from 1.0.21
  • add related sodium_bin2ip and sodium_ip2bin from 1.0.21
  • minor bugfixes and improvements

Documentation

simple passphrase-based encryption and decryption
perl implementation of minisign

Modules

perl XS bindings for libsodium
libsodium base64 functions and constants
libsodium low-level functions
Protected memory objects
Memory protection functions and constants
libsodium utilities
Authenticated encryption with additional data
Secret key message authentication
Asymmetric (public/secret key) authenticated encryption
Low-level functions over Curve25519
Cryptographic hashing
SHA2 cryptographic hashing
HMAC-based Extract-and-Expand Key Derivation Function
IP address encryption
Secret subkey derivation from a main secret key
Shared key derivation from client/server asymmetric key pairs
Single-use secret key message authentication
Password hashing and verification
Point-scalar multiplication on the Curve25519 curve.
Secret key authenticated encryption
Secret key authenticated encryption for multiple in-order messages
Short-input hashing
Asymmetric (public/secret key) signatures and verification
Stream ciphers

Provides

in lib/Crypt/Sodium/XS/Base.pm
in lib/Crypt/Sodium/XS/OO/Base.pm
in lib/Crypt/Sodium/XS/aead.pm
in lib/Crypt/Sodium/XS/auth.pm
in lib/Crypt/Sodium/XS/box.pm
in lib/Crypt/Sodium/XS/curve25519.pm
in lib/Crypt/Sodium/XS/generichash.pm
in lib/Crypt/Sodium/XS/hash.pm
in lib/Crypt/Sodium/XS/hkdf.pm
in lib/Crypt/Sodium/XS/ipcrypt.pm
in lib/Crypt/Sodium/XS/kdf.pm
in lib/Crypt/Sodium/XS/kx.pm
in lib/Crypt/Sodium/XS/onetimeauth.pm
in lib/Crypt/Sodium/XS/pwhash.pm
in lib/Crypt/Sodium/XS/scalarmult.pm
in lib/Crypt/Sodium/XS/secretbox.pm
in lib/Crypt/Sodium/XS/secretstream.pm
in lib/Crypt/Sodium/XS/shorthash.pm
in lib/Crypt/Sodium/XS/sign.pm
in lib/Crypt/Sodium/XS/stream.pm