Description
Apache::Session::Generate::SHA256 versions before 1.3.19 for Perl create insecure session ids.

Apache::Session::Generate::SHA256 generated session ids insecurely. The default session id generator returns a SHA-256 hash of the built-in rand() function, the epoch time, and the PID, that is hashed again. These are predictable, low-entropy sources. Predicable session ids could allow an attacker to gain access to systems.

Note that version 1.3.19 has a fallback without warning to use insecure session generation method if the call to Crypt::URandom::urandom fails. However, this is unlikely as Crypt::URandom is a hardcoded requirement of the module.

This issue is similar to CVE-2025-40931 for Apache::Session::Generate::MD5.
Published: 2026-05-15
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in Apache::Session::Generate::SHA256 modules before version 1.3.19, which create session identifiers by hashing the output of Perl's built‑in rand() function together with the current epoch time and process ID, and then hashing that result again. These sources are deterministic and provide very low entropy, allowing an attacker to predict or brute‑force valid session identifiers. The ability to guess session IDs can grant unauthorized access to protected resources if an application accepts the session token as authenticated credentials. The weakness is mapped to CWE‑340 – Use of Predictable Random Number Generators – and CWE‑338 – Hard‑Coded Key or Secret.

Affected Systems

All installations of Apache::Session::Generate::SHA256 prior to version 1.3.19 for Perl are affected. The fix is included in 1.3.19, which falls back to a secure random number generator provided by Crypt::URandom whenever available. No other vendor or product versions are listed as affected in the CNA data.

Risk and Exploitability

The CVSS score is 6.5, indicating moderate severity, and the EPSS score is < 1%, indicating a very low but non‑zero exploitation probability. The vulnerability is not listed in CISA's KEV catalog, suggesting that publicly available exploit evidence is not currently documented. However, the nature of the flaw – predictable session ID generation – means that an attacker who can observe or guess the epoch time and PID space can manually generate likely session tokens or conduct a brute‑force search against the deterministic set, potentially achieving session hijacking without requiring remote code execution or insider privileges. Consequently, the risk remains significant for systems that rely on this module for session management.

Generated by OpenCVE AI on May 15, 2026 at 17:35 UTC.

Remediation

Vendor Workaround

Upgrade to version 1.3.19 or later.


OpenCVE Recommended Actions

  • Upgrade Apache::Session::Generate::SHA256 to version 1.3.19 or later
  • Ensure that Crypt::URandom::urandom is available and functioning; if it fails, avoid relying on the fallback insecure method and consider replacing the module with a secure session generator
  • If an upgrade cannot be performed immediately, reconfigure the application to use an alternative session ID generator or disable session reuse for high‑privilege transactions to mitigate the impact of predictable tokens

Generated by OpenCVE AI on May 15, 2026 at 17:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 15 May 2026 16:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 15 May 2026 11:45:00 +0000

Type Values Removed Values Added
Description Apache::Session::Generate::SHA256 versions before 1.3.19 for Perl create insecure session ids. Apache::Session::Generate::SHA256 generated session ids insecurely. The default session id generator returns a SHA-256 hash of the built-in rand() function, the epoch time, and the PID, that is hashed again. These are predictable, low-entropy sources. Predicable session ids could allow an attacker to gain access to systems. Note that version 1.3.19 has a fallback without warning to use insecure session generation method if the call to Crypt::URandom::urandom fails. However, this is unlikely as Crypt::URandom is a hardcoded requirement of the module. This issue is similar to CVE-2025-40931 for Apache::Session::Generate::MD5.
Title Apache::Session::Generate::SHA256 versions before 1.3.19 for Perl create insecure session ids
Weaknesses CWE-338
CWE-340
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-05-15T15:37:28.791Z

Reserved: 2026-05-13T21:07:03.760Z

Link: CVE-2026-8503

cve-icon Vulnrichment

Updated: 2026-05-15T15:37:23.025Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-15T12:17:09.557

Modified: 2026-05-15T16:16:15.550

Link: CVE-2026-8503

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-15T17:45:04Z

Weaknesses