Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-30909: CWE-190 Integer Overflow or Wraparound in TIMLEGGE Crypt::NaCl::Sodium

0
Critical
VulnerabilityCVE-2026-30909cvecve-2026-30909cwe-190
Published: Sun Mar 08 2026 (03/08/2026, 00:46:12 UTC)
Source: CVE Database V5
Vendor/Project: TIMLEGGE
Product: Crypt::NaCl::Sodium

Description

Crypt::NaCl::Sodium versions through 2.002 for Perl has potential integer overflows. bin2hex, encrypt, aes256gcm_encrypt_afternm and seal functions do not check that output size will be less than SIZE_MAX, which could lead to integer wraparound causing an undersized output buffer. Encountering this issue is unlikely as the message length would need to be very large. For bin2hex() the bin_len would have to be > SIZE_MAX / 2 For encrypt() the msg_len would need to be > SIZE_MAX - 16U For aes256gcm_encrypt_afternm() the msg_len would need to be > SIZE_MAX - 16U For seal() the enc_len would need to be > SIZE_MAX - 64U

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/15/2026, 01:14:06 UTC

Technical Analysis

CVE-2026-30909 identifies an integer overflow vulnerability in the Crypt::NaCl::Sodium Perl module, specifically in versions through 2.002. The vulnerability stems from the lack of proper checks on output buffer sizes in key cryptographic functions such as bin2hex, encrypt, aes256gcm_encrypt_afternm, and seal. These functions fail to ensure that the calculated output size does not exceed the maximum value representable by the system's size_t type (SIZE_MAX). When extremely large input lengths are processed—exceeding thresholds like SIZE_MAX/2 for bin2hex or SIZE_MAX minus small constants for encryption functions—an integer wraparound can occur. This wraparound results in an undersized output buffer allocation, which can lead to buffer overflows during subsequent operations. Buffer overflows in cryptographic functions can cause memory corruption, potentially allowing attackers to execute arbitrary code, leak sensitive cryptographic keys or plaintext data, or cause denial of service by crashing applications. Although the vulnerability requires very large input sizes, which are uncommon in normal use, the critical nature of cryptographic libraries means that any exploitation could have severe consequences. The CVSS 3.1 base score of 9.8 reflects the high impact on confidentiality, integrity, and availability, with an attack vector over the network, no privileges or user interaction needed, and an unchanged scope. No patches or fixes are currently linked, and no known exploits have been reported in the wild as of the publication date. The vulnerability is assigned to the TIMLEGGE project and tracked by CPANSec.

Potential Impact

The impact of CVE-2026-30909 is severe due to its presence in a widely used cryptographic Perl library. Successful exploitation could lead to arbitrary code execution, unauthorized data disclosure, or denial of service in applications relying on Crypt::NaCl::Sodium for encryption and data integrity. This compromises the confidentiality and integrity of sensitive data and the availability of services employing this library. Organizations using this module in security-critical environments—such as secure messaging, data encryption, or authentication systems—face significant risks. The potential for remote exploitation without authentication or user interaction increases the threat level. Although exploitation requires very large input sizes, attackers targeting high-value systems or attempting to bypass cryptographic protections could leverage this vulnerability. The absence of known exploits currently limits immediate risk, but the critical CVSS score and the nature of the flaw necessitate urgent attention. Failure to address this vulnerability could lead to breaches impacting customer data, intellectual property, and operational continuity.

Mitigation Recommendations

To mitigate CVE-2026-30909, organizations should first monitor for official patches or updates from the TIMLEGGE Crypt::NaCl::Sodium maintainers and apply them promptly once available. In the absence of patches, developers should implement input validation to reject or limit message sizes well below the thresholds that trigger integer overflow conditions (e.g., significantly less than SIZE_MAX/2 for bin2hex and SIZE_MAX minus 64 for seal). Employing static and dynamic code analysis tools to detect unsafe buffer size calculations can help identify and remediate similar issues. Where feasible, consider replacing or wrapping vulnerable functions with safer alternatives that enforce strict size checks. Additionally, sandboxing or running cryptographic operations with least privilege can reduce the impact of potential exploitation. Organizations should also audit their use of Crypt::NaCl::Sodium to identify critical systems and prioritize mitigation efforts accordingly. Finally, monitoring for unusual application crashes or memory corruption events may help detect exploitation attempts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
CPANSec
Date Reserved
2026-03-07T13:09:20.640Z
Cvss Version
null
State
PUBLISHED

Threat ID: 69acc85d2904315ca3180bc1

Added to database: 3/8/2026, 12:52:45 AM

Last enriched: 3/15/2026, 1:14:06 AM

Last updated: 4/21/2026, 9:04:40 AM

Views: 73

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses