
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-40912 is a vulnerability in CryptX for Perl (before version 0.065) stemming from an embedded dependency — the LibTomCrypt library — that is susceptible to malformed Unicode input. Specifically, it inherits the flaw described in CVE-2019-17362, which affects the der_decode_utf8_string function in LibTomCrypt 1.18.2 and earlier. The vulnerability was published on June 11, 2025, and assigned by CPANSec (Red Hat Advisory, NVD). It carries a CVSS v3.1 base score of 9.8 (Critical), assessed by CISA-ADP (NVD).
The root cause lies in the der_decode_utf8_string function within LibTomCrypt's DER (Distinguished Encoding Rules) decoder, which fails to properly validate certain invalid UTF-8 byte sequences — specifically, sequences beginning with 10xxxxxx (continuation bytes) that are not valid as leading bytes (libtomcrypt GitHub). This flaw allows an attacker to craft DER-encoded data (e.g., a malicious X.509 certificate) such that der_length_utf8_string reports a length larger than the actual encoded string, causing pointer arithmetic to underflow the remaining buffer size. The result is an out-of-bounds read that can crash the application (denial of service) or, in a two-step attack scenario, expose adjacent memory contents to the attacker (libtomcrypt GitHub). The attack vector is network-based, requires no authentication or user interaction, and is triggered by supplying crafted DER-encoded input to any code path that processes X.509 certificates or similar structures via CryptX.
Successful exploitation can result in a denial of service via application crash (out-of-bounds read of invalid memory) or information disclosure by leaking adjacent heap/stack memory contents into a decoded DER structure that may subsequently be exported or transmitted (libtomcrypt GitHub). The CVSS score reflects high impact across confidentiality, integrity, and availability, meaning that in the worst case an attacker could read sensitive cryptographic material or other in-memory data from affected Perl applications using CryptX for certificate processing (Red Hat Advisory). Applications that import and then re-export X.509 certificates using CryptX are at elevated risk of information disclosure.
No public proof-of-concept exploit specifically targeting CVE-2025-40912 in CryptX has been identified, and there is no evidence of in-the-wild exploitation at this time (Red Hat Advisory). However, proof-of-concept code for the underlying CVE-2019-17362 flaw in LibTomCrypt was published in 2019 and is available in the libtomcrypt GitHub issue tracker, demonstrating both crash and memory-leak scenarios (libtomcrypt GitHub). The EPSS score is approximately 0.043%, indicating low current exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Qualys has a detection for this vulnerability (ID: 6260219).
0xBF), such as the sequence \x0c\x02\xbf\xbf. This causes der_decode_utf8_string to misinterpret the byte count.\x30\x84\xff\xff\xff\xff) after the malformed UTF-8 entry. When processed, the pointer arithmetic underflows, causing the decoder to attempt reading ~4GB of memory, likely crashing the process: \x30\x04\x0c\x02\xbf\xbf\xaa\x30\x84\xff\xff\xff\xff.\x30\x04\x0c\x02\xbf\xbf\xaa\x04\x82\xff\xff). This causes the decoder to include up to 65535 bytes of adjacent memory in the decoded certificate structure.cpan -D CryptX or package manager queries).The primary remediation is to upgrade CryptX for Perl to version 0.065 or later, which bundles a patched version of the LibTomCrypt library that correctly validates UTF-8 sequences in DER-encoded data (Red Hat Advisory). Ubuntu users should apply the fix via USN-8128-1 (Ubuntu Advisory). As a workaround where immediate upgrade is not possible, restrict or sanitize externally supplied DER-encoded input (e.g., X.509 certificates) before passing it to CryptX, and implement network segmentation to limit exposure of affected services. Audit all Perl applications in your environment that use CryptX for certificate processing to prioritize patching efforts.
Red Hat tracked the issue via Bugzilla (Bug 2372334) and classified it as medium severity internally, noting it as a denial-of-service vector (Red Hat Bugzilla). Ubuntu issued security notice USN-8128-1 addressing the vulnerability in their CryptX package (Ubuntu Advisory). The CPAN Security Advisory Database (CPANSA-DB) also catalogued the issue, reflecting community awareness within the Perl ecosystem. No significant broader media coverage or notable researcher commentary beyond standard advisory channels has been observed.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."