Description
HTTP::Session versions through 0.53 for Perl defaults to using insecurely generated session ids.

HTTP::Session defaults to using HTTP::Session::ID::SHA1 to generate session ids using a SHA-1 hash seeded with the built-in rand function, the high resolution epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage.

The distribution includes HTTP::session::ID::MD5 which contains a similar flaw, but uses the MD5 hash instead.
Published: 2026-03-28
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Session ID predictability (possible hijacking)
Action: Patch Now
AI Analysis

Impact

This vulnerability arises because the HTTP::Session module uses a non‑cryptographic rand function to seed SHA‑1 or MD5 hashes for session identifiers. The low‑entropy components—process ID, epoch time, and a predictable rand output—allow attackers to guess or reproduce session IDs. If an attacker obtains a valid session token, they can impersonate a legitimate user, leading to unauthorized access or data tampering. Because session IDs are the gateway to a user’s state, the weakness directly threatens confidentiality and integrity of the application.

Affected Systems

The flaw affects the Perl package HTTP::Session provided by developer KTAT, specifically all releases through version 0.53. Servers or web applications that rely on this module for managing user sessions are potentially vulnerable. The vulnerability applies to any environment running Perl with this module, regardless of operating system, unless the developer has overridden the default ID generator.

Risk and Exploitability

The CVSS score of 9.8 represents a high severity, and the EPSS score of less than 1% indicates a low likelihood of exploitation at present. However, the weakness can be exploited remotely by any client capable of guessing the predictable session token, especially if the HTTP Date header leaks the epoch time. Because the default configuration is what most users will have, a vulnerability in the session Id generator can be leveraged without requiring privileged access or additional software. The issue is not listed in the CISA KEV catalog, but the potential to cause session hijacking makes timely patching essential.

Generated by OpenCVE AI on April 1, 2026 at 05:41 UTC.

Remediation

Vendor Workaround

Users on systems with a /dev/urandom device should configure the module to use HTTP::Session::ID::Urandom. Users on systems without a /dev/urandom (such as Windows) device will need to create custom ID modules that make use of module such as Crypt::SysRandom or Crypt::URandom.


OpenCVE Recommended Actions

  • Upgrade HTTP::Session to at least version 0.54
  • Configure HTTP::Session to use HTTP::Session::ID::Urandom
  • On systems lacking /dev/urandom, implement a custom ID module using Crypt::SysRandom or Crypt::URandom
  • Verify that session IDs are generated using a cryptographically secure RNG

Generated by OpenCVE AI on April 1, 2026 at 05:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 01 Apr 2026 02:15:00 +0000

Type Values Removed Values Added
First Time appeared Ktat http\
CPEs cpe:2.3:a:ktat:http\:\:session:*:*:*:*:*:perl:*:*
Vendors & Products Ktat http\
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Mon, 30 Mar 2026 07:15:00 +0000

Type Values Removed Values Added
First Time appeared Ktat
Ktat http::session
Vendors & Products Ktat
Ktat http::session

Sat, 28 Mar 2026 21:30:00 +0000

Type Values Removed Values Added
References

Sat, 28 Mar 2026 19:15:00 +0000

Type Values Removed Values Added
Description HTTP::Session versions through 0.53 for Perl defaults to using insecurely generated session ids. HTTP::Session defaults to using HTTP::Session::ID::SHA1 to generate session ids using a SHA-1 hash seeded with the built-in rand function, the high resolution epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. The distribution includes HTTP::session::ID::MD5 which contains a similar flaw, but uses the MD5 hash instead.
Title HTTP::Session versions through 0.53 for Perl defaults to using insecurely generated session ids
Weaknesses CWE-338
CWE-340
References

Subscriptions

Ktat Http::session Http\
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-04-01T14:14:51.886Z

Reserved: 2026-02-26T11:59:23.755Z

Link: CVE-2026-3256

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Modified

Published: 2026-03-28T19:16:56.570

Modified: 2026-04-01T15:23:23.523

Link: CVE-2026-3256

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-02T07:55:09Z

Weaknesses