CVE Explorer
CVE-2026-2597
Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes().
The function does not validate that the length parameter is non-negative. If a negative value (e.g. -1) is supplied, the expression length + 1u causes an integer wraparound, resulting in a zero-byte allocation. The subsequent call to chosen random function (e.g. getrandom) passes the original negative value, which is implicitly converted to a large unsigned value (typic
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
1
Preserved source conflicts
No provider value was silently selected as the winner.
cwe · 2 assertions
{"cweId":"CWE-1284","description":"CWE-1284 Improper Validation of Specified Quantity in Input","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/problemTypes/1/descriptions/0
{"cweId":"CWE-122","description":"CWE-122 Heap-based Buffer Overflow","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/problemTypes/0/descriptions/0
Affected products and versions
1 source assertion{"collectionURL":"https://cpan.org/modules","defaultStatus":"unaffected","packageName":"Crypt-SysRandom-XS","product":"Crypt::SysRandom::XS","programFiles":["lib/Crypt/SysRandom/XS.xs"],"programRoutines":[{"name":"random_bytes()"}],"repo":"https://github.com/Leont/crypt-sysrandom-xs","vendor":"LEONT","versions":[{"lessThan":"0.010","status":"affected","version":"0","versionType":"custom"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/adp/0/metrics/0/cvssV3_1
CWE assertions
2 source assertions{"cweId":"CWE-1284","description":"CWE-1284 Improper Validation of Specified Quantity in Input","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/problemTypes/1/descriptions/0
{"cweId":"CWE-122","description":"CWE-122 Heap-based Buffer Overflow","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/problemTypes/0/descriptions/0
Source references
2 source assertions{"tags":["release-notes"],"url":"https://metacpan.org/dist/Crypt-SysRandom-XS/changes"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/references/0
{"tags":["related"],"url":"https://metacpan.org/release/LEONT/Crypt-SysRandom-XS-0.011/source/lib/Crypt/SysRandom/XS.xs#L51-52"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:ea20deb1ab838045c48f5f0a7d8ce6589f05521f3bd67fde232c772c91d6f9fe · sha256:abc1c7de26bbb764… · /containers/cna/references/1
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.