CVE-2026-2588

9.1 CRITICAL

📋 TL;DR

This CVE describes an integer overflow vulnerability in Crypt::NaCl::Sodium Perl module versions through 2.001 on 32-bit systems. The flaw occurs when casting size_t to unsigned long long, potentially causing buffer overflows or memory corruption when processing large inputs. Only Perl applications using this cryptographic library on 32-bit architectures are affected.

💻 Affected Systems

Products:
  • Crypt::NaCl::Sodium Perl module
Versions: Versions through 2.001
Operating Systems: 32-bit Linux systems, 32-bit Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects 32-bit systems where size_t is 32-bit. 64-bit systems are not vulnerable. Requires Perl applications that use the affected library functions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Memory corruption leading to arbitrary code execution, potentially compromising the entire system running the vulnerable Perl application.

🟠

Likely Case

Application crashes (denial of service) when processing specially crafted large inputs, potentially causing data loss or service disruption.

🟢

If Mitigated

No impact if proper input validation and size checking is implemented before passing data to the vulnerable functions.

🌐 Internet-Facing: MEDIUM - Risk depends on whether the vulnerable Perl application is exposed to untrusted input from external sources.
🏢 Internal Only: LOW - Lower risk if application only processes trusted internal data with controlled input sizes.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending specially crafted large inputs to trigger the integer overflow. No public exploits have been documented as of the available information.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 2.001 (patches available in GitHub commits)

Vendor Advisory: https://metacpan.org/release/TIMLEGGE/Crypt-NaCl-Sodium

Restart Required: Yes

Instructions:

1. Update Crypt::NaCl::Sodium using CPAN: 'cpan Crypt::NaCl::Sodium'
2. Or install from source using patched version from GitHub
3. Restart any Perl applications using the library

🔧 Temporary Workarounds

Input size validation

all

Implement input size checking in application code before passing data to Crypt::NaCl::Sodium functions

Migrate to 64-bit systems

all

Deploy affected applications on 64-bit operating systems where the vulnerability does not exist

🧯 If You Can't Patch

  • Implement strict input validation to reject inputs larger than safe limits
  • Monitor application logs for crashes or abnormal behavior related to cryptographic operations

🔍 How to Verify

Check if Vulnerable:

Check Perl module version: 'perl -MCrypt::NaCl::Sodium -e "print $Crypt::NaCl::Sodium::VERSION"' and verify if ≤2.001 on 32-bit system

Check Version:

perl -MCrypt::NaCl::Sodium -e "print $Crypt::NaCl::Sodium::VERSION"

Verify Fix Applied:

Verify updated version >2.001 is installed and test with sample inputs that previously triggered issues

📡 Detection & Monitoring

Log Indicators:

  • Perl application crashes with segmentation faults
  • Memory corruption errors in system logs
  • Abnormal termination of Perl processes using cryptography

Network Indicators:

  • Unusually large data payloads sent to applications using Crypt::NaCl::Sodium

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "memory corruption") AND process="perl"

🔗 References

📤 Share & Export