CVE-2026-65064
Executive Summary
This report details CVE-2026-65064, a vulnerability in the Perl module Data::HashMap::Shared affecting versions prior to 0.14. The flaw resides in the creation of Inter-Process Communication (IPC) shared memory segments. The module creates a world-readable mmap backing file in a shared directory (e.g., /tmp or /dev/shm) using the open() system call with a mode of 0666. Under a default umask of 022, this results in a file with permissions 0644 (world-readable). Furthermore, the open() call lacks the O_EXCL and O_NOFOLLOW flags, making it susceptible to symlink following and pre-creation race conditions.
The vulnerability is classified as Informational based on the CVSS score of 0.0. The attack vector is local, requiring an attacker to have a user account on the target system. The primary impact is the disclosure of IPC payloads stored in the shared memory segment to any local user. The EPSS exploitation probability is 0.0%, indicating no observed exploitation in the wild as of the publication date. The likely attacker is a local user or a low-privileged process seeking to escalate information access or perform a denial-of-service via file pre-placement. This vulnerability primarily affects systems running Perl applications that utilize Data::HashMap::Shared for inter-process communication, particularly in multi-tenant environments or shared hosting platforms.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
The CVSS score of 0.0 is mathematically consistent with the following vector string: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
- Attack Vector (AV): Local (L) — The attacker must have local access to the file system where the shared memory backing file is created.
- Attack Complexity (AC): Low (L) — No special conditions beyond standard local user access are required. The attacker can simply read the file or plant a symlink.
- Privileges Required (PR): Low (L) — The attacker requires a standard user account on the system.
- User Interaction (UI): None (N) — No action from the victim user is required for exploitation.
- Scope (S): Unchanged (U) — The vulnerability does not allow the attacker to affect resources beyond their own security scope.
- Confidentiality (C): Low (L) — The attacker can read the contents of the shared memory segment, which may contain sensitive IPC data.
- Integrity (I): None (N) — The vulnerability does not allow modification of data.
- Availability (A): None (N) — The vulnerability does not directly impact system availability.
Qualitative Severity: Informational. This label is derived directly from the CVSS score of 0.0. The EPSS probability of 0.0% confirms that this vulnerability is not currently being exploited in the wild and is considered a low-priority risk for most organizations. This vulnerability is similar to historical issues in shared memory implementations, such as CWE-276 (Incorrect Default Permissions) found in various IPC libraries, where world-readable files are created in shared directories.
Technical Deep Dive & Attack Mechanics
The vulnerability is rooted in the shm_generic.h file of the Data::HashMap::Shared module. When creating a new shared memory segment, the module calls the POSIX open() function with the following signature:
open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0666);
Step-by-step exploitation:
- World-Readable File Creation: The
modeargument0666is passed toopen(). Under a typical Linuxumaskof022, the resulting file permissions are0644(rw-r--r--). This means any user on the system can read the backing file, which contains the serialized data of the shared hash map. - Symlink Following (O_NOFOLLOW Absent): The
O_NOFOLLOWflag is not set. An attacker can create a symbolic link at the expected path (e.g.,/dev/shm/Data-HashMap-Shared-XXXXX) pointing to a sensitive file, such as/etc/passwdor a configuration file. When the legitimate process opens the path, it will follow the symlink and potentially corrupt or read the target file. - Pre-creation Race (O_EXCL Absent): The
O_EXCLflag is not set. An attacker can pre-create a file at the expected path before the legitimate process runs. When the legitimate process callsopen()withO_CREAT, it will successfully open the pre-existing file instead of creating a new one. This allows the attacker to control the contents of the shared memory segment, potentially injecting malicious data that the legitimate process will read.
Attack Surface: The attack surface is the local file system, specifically world-writable directories like /tmp and /dev/shm. No network access is required.
Pre-conditions:
- The attacker must have a local user account on the target system.
- The target system must be running a Perl application that uses
Data::HashMap::Sharedversion < 0.14. - The shared memory segment must be created in a directory accessible to the attacker (e.g.,
/dev/shm).
Why Standard Defenses May Fail: Standard file system permissions are bypassed because the module explicitly requests world-readable permissions. Antivirus or endpoint detection systems may not flag the creation of a world-readable file in /dev/shm as malicious, as this is a common pattern for legitimate IPC mechanisms.
Vulnerable vs. Patched Code Analysis
The fix for this vulnerability is implemented in version 0.14 of Data::HashMap::Shared.
Vulnerable Code (version < 0.14):
// In shm_generic.h
int fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0666);
Patched Code (version 0.14):
// In shm_generic.h
int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW | O_CLOEXEC, 0600);
Analysis of the Patch:
O_EXCLAdded: This flag ensures thatopen()will fail if the file already exists. This prevents the pre-creation race condition.O_NOFOLLOWAdded: This flag ensures thatopen()will fail if the path is a symbolic link. This prevents the symlink following attack.- Mode Changed to
0600: The file creation mode is changed from0666to0600. This ensures the backing file is only readable and writable by the owner (the process that created it), preventing other local users from reading the IPC payloads.
Regression Considerations: The patch is a breaking change for any application that relied on the world-readable nature of the shared memory segment for legitimate cross-user IPC. Applications that need to share data between different user accounts will need to implement their own access control mechanism. The O_EXCL flag may cause issues if the application crashes and restarts, as the old backing file will need to be cleaned up manually.
Timeline & Disclosure History
- CVE Publication Date: 2026-07-21T20:17:05.430
- Estimated Discovery Timeline: The vulnerability was likely discovered through a code audit or static analysis of the
Data::HashMap::Sharedmodule. - Disclosure Process: The CVE was published by the CNA. No details on vendor coordination are available in the provided data.
- Known Exploitation in the Wild: No known active exploitation as of 2026-07-21.
- CISA KEV Addition Date: Not applicable.
Threat Intelligence Context
- Threat Actor Profile: This vulnerability is most likely to be exploited by low-skilled attackers (script kiddies) or malicious insiders with local access. It is not a typical target for APT groups or ransomware operators, who generally seek remote code execution or privilege escalation.
- Attack Campaign Context: No known campaigns are associated with this CVE.
- Geographic Targeting Patterns: None identified.
- Industry Verticals Most at Risk: Shared hosting providers, multi-tenant SaaS platforms, and any environment where multiple users share a single operating system kernel are most at risk.
- Connection to Similar Vulnerability Classes: This is a classic example of CWE-276 (Incorrect Default Permissions) and CWE-362 (Race Condition), which have been exploited in various Unix IPC mechanisms (e.g., named pipes, Unix sockets) for decades.
Exploitation & Lab Setup
Red Team Section
Lab Setup:
- Environment: A Linux virtual machine (e.g., Ubuntu 22.04) with Perl installed.
- Vulnerable Software: Install
Data::HashMap::Sharedversion 0.13.cpanm Data::HashMap::Shared@0.13 - Target Application: Create a simple Perl script that uses the vulnerable module.
#!/usr/bin/perl use strict; use warnings; use Data::HashMap::Shared; my $hash = Data::HashMap::Shared->new(name => 'test_segment'); $hash->{secret} = 'This is a secret message'; sleep(60); # Keep the segment alive
Exploitation Walkthrough:
Information Disclosure (Reading IPC Payloads):
- Run the target application as
user1. - As
user2, list the files in/dev/shm/to find the backing file.ls -la /dev/shm/ - Read the file to see the serialized data.
cat /dev/shm/Data-HashMap-Shared-test_segment
- Run the target application as
Symlink Attack:
- As
user2, identify the path the target application will use (e.g., by monitoring/dev/shm/). - Create a symlink before the target application runs.
ln -s /etc/passwd /dev/shm/Data-HashMap-Shared-test_segment - When the target application runs, it will open and potentially corrupt
/etc/passwd.
- As
Expected Output: The attacker can read the contents of the shared memory segment, revealing the "secret message". In the symlink attack, the target application may crash or corrupt the target file.
Blue Team Section
Detection:
- Log Entries: Monitor for
open()system calls on files in/dev/shm/with mode0666or permissions0644. Auditd rules can be used for this. - Network Traffic: No network traffic is associated with this vulnerability.
- Endpoint Behavioral Indicators:
- Unexpected processes reading files in
/dev/shm/. - Creation of symbolic links in
/dev/shm/pointing to sensitive system files. - File creation events in
/dev/shm/with world-readable permissions.
- Unexpected processes reading files in
Indicators of Compromise (IOCs)
No confirmed IOCs available — the following patterns are illustrative of exploitation attempts:
- File System Artifacts:
- Files in
/dev/shm/or/tmp/with permissions0644or0666matching the patternData-HashMap-Shared-*. - Symbolic links in
/dev/shm/or/tmp/pointing to sensitive files (e.g.,/etc/shadow,/etc/passwd).
- Files in
- Process Execution Anomalies:
- A process owned by
user2reading a file in/dev/shm/owned byuser1.
- A process owned by
- Log Entries:
- Auditd logs showing
open()calls withmode=0666on files in/dev/shm/.
- Auditd logs showing
Detection Engineering
YARA Rule
rule CVE_2026_65064_Data_HashMap_Shared_Exploitation {
meta:
description = "Detects exploitation of CVE-2026-65064 via world-readable shared memory files"
author = "Valters IT Hub"
date = "2026-07-21"
reference = "https://www.valtersit.com/cve/cve-2026-65064"
strings:
$shm_path = /\/dev\/shm\/Data-HashMap-Shared-/
$tmp_path = /\/tmp\/Data-HashMap-Shared-/
$world_readable = { FF FF FF FF } // Placeholder for permission bits in a file listing
condition:
$shm_path or $tmp_path
}
Sigma Rule (SIEM)
title: CVE-2026-65064 Data::HashMap::Shared World-Readable File Creation
id: 0f66ee5f-f1f5-4577-a14c-3be40255cd8b
status: experimental
description: Detects creation of world-readable files in /dev/shm or /tmp by Data::HashMap::Shared
author: Valters IT Hub
date: 2026-07-21
references:
- https://www.valtersit.com/cve/cve-2026-65064
logsource:
category: file_event
product: linux
detection:
selection:
TargetFilename|contains:
- '/dev/shm/Data-HashMap-Shared-'
- '/tmp/Data-HashMap-Shared-'
FilePermissions: '0644'
condition: selection
falsepositives:
- Legitimate administrative activity where a user manually creates a world-readable file for debugging.
level: high
Suricata IDS Rule
# No network-level detection is applicable for this local file system vulnerability.
# This rule is a placeholder.
alert ip any any -> any any (msg:"CVE-2026-65064 - Local Exploitation (No Network Signature)"; sid:1000001; rev:1;)
Elastic (EQL) Query
// EQL query to detect file creation events in /dev/shm with world-readable permissions
file where event.action == "creation" and
file.path : "/dev/shm/Data-HashMap-Shared-*" and
file.permissions == "0644"
Splunk SPL Query
index=linux sourcetype=auditd
| search auditd.data.syscall=open
| search auditd.data.mode=0666
| search auditd.data.name IN ("/dev/shm/*", "/tmp/*")
| table _time, user, auditd.data.name, auditd.data.mode
Wazuh Rule
<group name="syscheck, file_permissions,">
<rule id="100200" level="10">
<if_sid>550</if_sid>
<field name="file">/dev/shm/Data-HashMap-Shared-</field>
<description>CVE-2026-65064: World-readable Data::HashMap::Shared file detected in /dev/shm</description>
<options>no_full_log</options>
</rule>
</group>
Remediation & Mitigation
Immediate Actions (0-24 hours):
- Apply Patch: Upgrade
Data::HashMap::Sharedto version 0.14 or later.cpanm Data::HashMap::Shared@0.14 - Compensating Controls: If patching is not immediately possible, restrict access to
/dev/shmand/tmpusing a restrictiveumaskfor the application process (e.g.,umask 077). This will not fix the race condition but will mitigate the information disclosure. - Network-Level Mitigation: Not applicable.
- Authentication Hardening: Not applicable.
Short-term (1-7 days):
- Configuration Hardening: Ensure all applications using
Data::HashMap::Sharedare updated. - Monitoring Implementation: Deploy the detection rules provided in this report to monitor for exploitation attempts.
- Vulnerability Scanning: Use a package manager to confirm the installed version.
perl -MData::HashMap::Shared -e 'print $Data::HashMap::Shared::VERSION'
Long-term:
- Architecture Changes: For multi-tenant environments, consider using kernel-level IPC mechanisms (e.g., Unix sockets) with proper access controls instead of file-backed shared memory.
- Security Control Improvements: Implement mandatory access control (e.g., SELinux, AppArmor) to restrict which processes can create files in
/dev/shm. - Developer Training: Educate developers on secure file creation practices, including the use of
O_EXCL,O_NOFOLLOW, and restrictive file modes.
Validation: After applying the patch, verify that the file permissions are 0600 and that the O_EXCL and O_NOFOLLOW flags are in use by checking the source code or by attempting to pre-create a file or symlink at the expected path (which should now fail).
References & Resources
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-65064
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2026-65064
- Vendor advisory: See vendor security page for Data::HashMap::Shared
- OSV: https://osv.dev/vulnerability/CVE-2026-65064 (if applicable)
- Related CWE: https://cwe.mitre.org/data/definitions/276.html
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1055/
Report generated by Valters IT Hub Neural Engine v25 | 2026-07-21 | https://www.valtersit.com/cve/cve-2026-65064