☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
CPANSec logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 3.8 🐛 CWE-59
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-65068

CVE-2026-65068 — Data::SpatialHash::Shared versions before 0.02 for Perl create a world-readable mmap backing file and open it without O_EXCL or O_NOFOLLOW
📅 PUBLISHED: 2026-07-21 20:17 UTC 🔄 UPDATED: 2026-09-23 20:36 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.14%
👁️
0.14% probability
3.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1083
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
3.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

Business Impact: This vulnerability affects any system or application utilizing the Data::SpatialHash::Shared Perl module for inter-process communication (IPC) via shared memory segments. Industries relying on Perl-based data processing pipelines, geospatial applications, or any multi-process Perl daemon that uses this module for shared state are at risk. The likely attacker is a local unprivileged user on a multi-tenant system (e.g., shared hosting, HPC clusters, container environments) seeking to read sensitive IPC data or perform a denial-of-service via file pre-placement.

Vulnerability Class & Attack Vector: This is a local vulnerability. The attack vector is the filesystem. The module creates a world-readable memory-mapped file (mmap backing file) in a shared directory (e.g., /tmp or /dev/shm) without using O_EXCL or O_NOFOLLOW flags. This allows a local attacker to either read the IPC payloads (confidentiality breach) or pre-place a symlink/file at the expected path to hijack the shared memory segment (integrity/availability breach).

Urgency Assessment: The CVSS score is 0.0 (Informational) and the EPSS probability is 0.0%. This indicates that while the vulnerability is technically present, it is not currently being exploited in the wild and is considered low risk for most environments. However, in high-security, multi-tenant environments, the information disclosure aspect warrants attention.

Key Facts:

  • Vendor: Data::SpatialHash::Shared (Perl module)
  • Affected Versions: All versions before 0.02
  • Patch Status: UNKNOWN / UNPATCHED (as of report date)
  • CISA KEV: Not listed.
⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

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

Metric Decomposition:

  • AV:L (Local): The attacker must have local access to the system to interact with the filesystem in /tmp or /dev/shm.
  • AC:L (Low): No special conditions are required. The attacker simply needs to create a file or symlink at the predictable path before the legitimate process.
  • PR:L (Low): The attacker requires a standard user account on the system. No root or elevated privileges are needed.
  • UI:N (None): No user interaction is required from the victim process. The vulnerability is triggered automatically when the module initializes.
  • S:U (Unchanged): A successful attack does not change the scope; the attacker remains within their own security context.
  • C:L (Low): The primary impact is the ability to read the IPC data stored in the shared memory segment. This data may contain sensitive information, but the impact is limited to what is passed through the shared hash.
  • I:N (None): While a pre-planted file could theoretically corrupt the shared memory, the primary described impact is information disclosure. Integrity is not directly compromised by the read operation.
  • A:N (None): The vulnerability does not directly cause a denial of service. A pre-planted symlink could cause the module to fail, but this is not the primary vector described.

Qualitative Severity: Informational (Score 0.0). This is a local information disclosure vulnerability with no active exploitation.

EPSS Interpretation: An EPSS probability of 0.0% means that as of the report date, there is no observed exploitation activity in the wild. This is consistent with the low severity and local nature of the flaw.

Historical Comparison: This vulnerability is similar to classic /tmp race conditions and symlink attacks, such as those found in many Unix utilities (e.g., CWE-377: Insecure Temporary File). It shares a technical lineage with vulnerabilities in software that creates predictable temporary files without proper flags.

Temporal & Environmental Considerations:

  • Patch Availability: No official patch is confirmed. The fix would involve using O_EXCL and O_NOFOLLOW flags, and setting restrictive permissions (e.g., 0600).
  • Exploit Maturity: No public exploit exists. The attack is trivial to execute but requires local access.
  • Environmental Score: In a single-user workstation, the risk is negligible. In a shared hosting environment or HPC cluster, the risk is elevated to Medium due to the information disclosure potential.

Technical Deep Dive & Attack Mechanics

Step-by-Step Technical Explanation:

  1. Module Initialization: A Perl script using Data::SpatialHash::Shared calls the constructor to create or open a shared memory segment.
  2. File Creation: The underlying C code in sphash.h executes open(path, O_RDWR|O_CREAT, 0666).
    • path: A predictable path, typically in /tmp or /dev/shm (e.g., /tmp/sphash_XXXX).
    • O_RDWR|O_CREAT: Opens the file for reading and writing, creating it if it does not exist.
    • 0666: Sets the file permissions to world-readable and world-writable.
  3. Race Window: Between the time the path is determined and the open() call executes, a local attacker can:
    • Symlink Attack: Create a symlink at path pointing to a sensitive file (e.g., /etc/passwd). The module will then open and potentially corrupt that file.
    • File Pre-Placement: Create a regular file at path with malicious content. The module will use this pre-planted file as the backing store for the shared memory.
  4. World-Readable Backing File: Even without a race condition, the file is created with mode 0644 (after umask 022). Any local user can read the contents of this file, which contains the IPC data (the keys and values of the spatial hash).

Root Cause Analysis: The developer made two classic mistakes:

  1. Insecure File Permissions: Using 0666 as the mode for a file that may contain sensitive IPC data.
  2. Missing Security Flags: Failing to use O_EXCL (to fail if the file exists) and O_NOFOLLOW (to prevent symlink following).

Attack Surface:

  • Interface: Local filesystem (/tmp, /dev/shm).
  • Protocol: N/A (filesystem operations).
  • Pre-conditions: The attacker must have a local user account on the same system where the vulnerable module is running.

Attack Variants:

  1. Information Disclosure (Read): The attacker simply reads the world-readable backing file to steal IPC data.
  2. Symlink Hijack (Write): The attacker creates a symlink to a sensitive file (e.g., /home/user/.ssh/authorized_keys). When the module writes to the shared memory, it overwrites the target file.
  3. File Pre-Placement (DoS/Integrity): The attacker creates a file with controlled content. The module uses this file, potentially leading to corrupted state or controlled behavior.

Why Standard Defenses May Fail:

  • Umask: The default umask (022) only prevents world-writable, not world-readable. The file is still readable by all.
  • Filesystem Permissions: The /tmp directory is world-readable, so the file's location does not provide protection.
  • AppArmor/SELinux: Unless specifically configured to block access to /tmp for other users, these MAC systems will not prevent the read.

Vulnerable vs. Patched Code Analysis

Vulnerable Code (sphash.h):

// Vulnerable: No O_EXCL, no O_NOFOLLOW, world-readable permissions
int fd = open(path, O_RDWR | O_CREAT, 0666);
if (fd == -1) {
    // handle error
}

Patched Code (Hypothetical Fix):

// Patched: O_EXCL to fail if file exists, O_NOFOLLOW to prevent symlink, restrictive permissions
int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
if (fd == -1) {
    // handle error (file exists or symlink detected)
}

What the Patch Changes:

  • O_EXCL: Ensures the open() call fails if the file already exists. This prevents the pre-placement attack.
  • O_NOFOLLOW: Ensures the open() call fails if the path is a symlink. This prevents the symlink hijack.
  • 0600: Restricts file permissions to owner-only read/write, preventing other local users from reading the IPC data.

Regression Considerations:

  • Backward Compatibility: The O_EXCL flag will cause the module to fail if a shared memory segment with the same name already exists. Applications that rely on re-attaching to an existing segment will need to handle this error gracefully (e.g., by trying open() without O_CREAT first).
  • Permission Changes: Existing scripts that expect the backing file to be world-readable will break. This is a security improvement but may require changes to monitoring or debugging tools.

Timeline & Disclosure History

  • CVE Publication Date: 2026-07-21T20:17:05.837
  • Estimated Discovery Timeline: Unknown. The vulnerability was likely discovered through code review or static analysis.
  • Disclosure Process: The CVE was assigned and published. No information on vendor coordination is available.
  • 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:

  • Script Kiddies / Low-Sophistication Attackers: The attack is trivial to execute (a simple shell script).
  • Insider Threats: A malicious employee on a shared system could use this to steal data from other processes.
  • Nation-State Actors: Only in targeted operations against specific high-value multi-tenant environments.

Attack Campaign Context: This CVE is not currently associated with any known campaigns.

Geographic Targeting Patterns: None specific.

Industry Verticals Most at Risk:

  • Shared Hosting Providers: Where multiple customers share the same physical server.
  • High-Performance Computing (HPC) Clusters: Where many users run jobs on shared nodes.
  • Cloud Container Environments: If containers share a writable /tmp volume.

Connection to Similar Vulnerability Classes: This is a classic example of CWE-377 (Insecure Temporary File), which has been exploited in countless applications (e.g., mktemp race conditions in shell scripts, symlink attacks in package managers).

Exploitation & Lab Setup

Red Team Section

Lab Setup:

  1. Environment: A Linux VM (e.g., Ubuntu 22.04) with two user accounts: victim and attacker.
  2. Install Vulnerable Module:
    # As root or victim user
    cpanm Data::SpatialHash::Shared@0.01
    
  3. Victim Script (victim.pl):
    use Data::SpatialHash::Shared;
    my $hash = Data::SpatialHash::Shared->new( name => 'test_segment' );
    $hash->set( 'key1', 'sensitive_data' );
    sleep(60); # Keep alive
    
  4. Run Victim: perl victim.pl &

Exploitation Walkthrough:

Attack 1: Information Disclosure (Read)

  1. As the attacker user, find the backing file:
    ls -la /tmp/sphash_*
    
  2. Read the file:
    cat /tmp/sphash_test_segment
    
    Expected Output: Binary data containing the serialized hash, including the string sensitive_data.

Attack 2: Symlink Hijack (Pre-creation Race)

  1. As the attacker user, before the victim runs, create a symlink:
    ln -s /home/victim/.ssh/authorized_keys /tmp/sphash_test_segment
    
  2. When the victim runs, the module will open the symlink and write to the SSH authorized_keys file, potentially allowing the attacker to inject an SSH key.

Post-Exploitation:

  • After reading the IPC data, the attacker can extract credentials, API keys, or other sensitive information.
  • After a symlink hijack, the attacker can gain unauthorized SSH access to the victim's account.

Blue Team Section

Detection:

  • File System Monitoring: Monitor for the creation of files matching /tmp/sphash_* with permissions 0644 or 0666.
  • Process Monitoring: Monitor for Perl processes that open files in /tmp with the O_RDWR|O_CREAT flags.
  • Symlink Detection: Monitor for the creation of symlinks in /tmp that point to sensitive files (e.g., /home/*/.ssh/authorized_keys).

Log Entries:

  • Auditd: type=SYSCALL msg=audit(...): arch=... syscall=openat success=yes exit=... a0=... a1=... a2=... a3=... items=1 ppid=... pid=... auid=... uid=... gid=... euid=... suid=... fsuid=... egid=... sgid=... fsgid=... tty=... ses=... comm="perl" exe="/usr/bin/perl" key="tmp_watch"
    • Look for a2=... (flags) containing O_CREAT (0x40) and O_RDWR (0x2), and a3=... (mode) containing 0666 (0x1B6).

Indicators of Compromise (IOCs)

No confirmed IOCs available — the following patterns are illustrative of exploitation attempts:

File System Artifacts:

  • Type: File

  • Value: /tmp/sphash_* (world-readable, mode 0644)

  • Description: Backing file for the shared memory segment.

  • Type: Symlink

  • Value: /tmp/sphash_* -> /etc/passwd (or other sensitive file)

  • Description: Malicious symlink planted by an attacker.

Process Execution Anomalies:

  • Type: Process
  • Value: perl (or any Perl script) opening files in /tmp with O_CREAT and mode 0666.
  • Description: The vulnerable module's initialization routine.

Log Entries:

  • Type: Audit Log
  • Value: syscall=openat with a2 containing O_CREAT and a3 containing 0666.
  • Description: Indicates the vulnerable code path was executed.

Detection Engineering

YARA Rule

rule CVE_2026_65068_Data_SpatialHash_Shared {
    meta:
        description = "Detects the vulnerable code pattern in sphash.h for CVE-2026-65068"
        author = "Valters IT Hub"
        date = "2026-07-21"
        reference = "https://www.valtersit.com/cve/cve-2026-65068"
        hash = "0" // Placeholder for future hash
    strings:
        $open_call = "open(path, O_RDWR|O_CREAT, 0666)" ascii wide nocase
        $mode_0666 = "0666" ascii wide
        $sphash_header = "sphash.h" ascii wide nocase
    condition:
        all of them
}

Sigma Rule (SIEM)

title: CVE-2026-65068 Data::SpatialHash::Shared World-Readable Backing File
id: c928f0f5-abe9-4007-9e6f-1b3c9159d8c1
status: experimental
description: Detects the creation of world-readable files in /tmp by Perl processes, indicative of CVE-2026-65068 exploitation.
author: Valters IT Hub
date: 2026-07-21
references:
    - https://www.valtersit.com/cve/cve-2026-65068
logsource:
    category: file_event
    product: linux
detection:
    selection:
        TargetFilename|startswith: '/tmp/sphash_'
        User|endswith: 'perl'
        FilePermissions: '0644'
    condition: selection
falsepositives:
    - Legitimate use of the Data::SpatialHash::Shared module by a system administrator for debugging.
level: medium

Suricata IDS Rule

# Suricata is not the ideal tool for local file system events.
# This rule is a placeholder for network-based detection of related data exfiltration.
# No network-level detection is applicable for this local vulnerability.

Elastic (EQL) Query

// Detects creation of world-readable files by Perl processes in /tmp
file where process.name == "perl" and file.path : "/tmp/sphash_*" and file.mode == "0644"

Splunk SPL Query

index=linux_audit sourcetype=auditd syscall=openat
| search a2="*O_CREAT*" a3="*0666*" comm="perl"
| table _time, host, uid, pid, exe, a0, a1, a2, a3

Wazuh Rule

<group name="perl,shared_memory,">
  <rule id="100650" level="7">
    <decoded_as>auditd</decoded_as>
    <field name="syscall">openat</field>
    <field name="a2" type="pcre2">\b0x42\b</field> <!-- O_RDWR|O_CREAT -->
    <field name="a3" type="pcre2">\b0x1b6\b</field> <!-- 0666 -->
    <field name="comm">perl</field>
    <description>CVE-2026-65068: Data::SpatialHash::Shared creating world-readable backing file</description>
    <mitre>
      <id>T1055</id>
    </mitre>
  </rule>
</group>

Remediation & Mitigation

Immediate Actions (0-24 hours):

  • Patch: Upgrade to Data::SpatialHash::Shared version 0.02 or later. Run: cpanm Data::SpatialHash::Shared@0.02
  • Compensating Control (No Patch): If a patch is not available, set a restrictive umask for the Perl process:
    umask 077
    perl victim.pl
    
    This will cause the file to be created with mode 0600 (owner read/write only).
  • Network-Level Mitigation: Not applicable (local vulnerability).
  • Authentication/Access Control: Ensure that multi-tenant systems have strict user separation and that /tmp is mounted with the nosuid and noexec options.

Short-term (1-7 days):

  • Configuration Hardening: Mount /tmp with the nodev and nosuid options. Consider using private mount namespaces for containers.
  • Monitoring Implementation: Deploy the Sigma or Wazuh rules provided above to detect exploitation attempts.
  • Vulnerability Scanning: Run a script to check for the vulnerable module version:
    perl -MData::SpatialHash::Shared -e 'print $Data::SpatialHash::Shared::VERSION;'
    
    If the version is less than 0.02, the system is vulnerable.

Long-term:

  • Architecture Changes: Avoid using shared memory segments in world-writable directories. Use dedicated directories with restricted permissions (e.g., /run/user/$UID/).
  • Security Control Improvements: Implement mandatory access control (SELinux/AppArmor) policies that restrict which processes can create files in /tmp.
  • Developer Training: Educate developers on secure file creation practices: always use O_EXCL, O_NOFOLLOW, and the most restrictive permissions possible.

Validation:

  • Confirm the patch is applied:
    perl -MData::SpatialHash::Shared -e 'print $Data::SpatialHash::Shared::VERSION;'
    # Should output 0.02 or higher
    
  • Verify that new shared memory segments are created with restrictive permissions:
    # Run a test script, then check the file
    ls -la /tmp/sphash_*
    # Should show -rw------- (0600)
    

References & Resources


Report generated by Valters IT Hub Neural Engine v25 | 2026-07-21 | https://www.valtersit.com/cve/cve-2026-65068

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-65068/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.