django-pyas2 CVE-2026-42168
CRITICALSeverity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Requires admin write access to the Partner config, so PR:H; network-reachable admin UI with low complexity, and shell command execution yields full C/I/A impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
5DescriptionCVE.org
django-pyas2 through 1.2.3 is vulnerable to OS command injection via the cmd_receive and cmd_send fields on the Partner model. These fields are passed directly to os.system() in pyas2/utils.py without sanitization, allowing an authenticated admin user to execute arbitrary commands on the server when an AS2 message is received or sent.
AnalysisAI
OS command injection in django-pyas2 through version 1.2.3 lets an authenticated admin plant shell commands in the Partner model's cmd_receive and cmd_send fields, which pyas2/utils.py hands directly to os.system() when an AS2 message is processed. The submitted CVSS vector rates this 9.1 (network, unauthenticated), but the description explicitly requires an authenticated admin user, so real-world exploitability is meaningfully narrower than the headline score. EPSS is low (0.64%, 47th percentile), there is no CISA KEV listing, and a third-party vulnerability-research repository is referenced that appears to document the flaw.
Technical ContextAI
django-pyas2 is a Django web application implementing the AS2 (Applicability Statement 2) secure file-transfer protocol used for B2B EDI exchange. Partner objects in the app expose cmd_receive and cmd_send hook fields intended to run post-processing commands on inbound/outbound payloads; the code path in pyas2/utils.py interpolates these operator-supplied strings into os.system() with no escaping or allow-listing. This is a textbook CWE-78 (Improper Neutralization of Special Elements used in an OS Command) issue: because os.system() invokes a shell, metacharacters such as ;, |, $(), and backticks in the stored field are interpreted by /bin/sh, converting a configuration field into arbitrary command execution. The CPE data supplied is a placeholder (cpe:2.3:a:n/a:n/a:*) and does not identify the product, so affected-version scoping rests on the CVE description rather than NVD CPE.
RemediationAI
No vendor-released patch is identified at time of analysis - the referenced v1.2.3 release notes only cover a pyas2lib bump to 1.4.3, field-length and documentation changes, and contain no fix for this command-injection path, and 1.2.3 is the affected version. As compensating controls: restrict and network-segment the Django admin interface (bind it behind VPN/allow-listed IPs and require strong MFA) so the required admin credential is hard to reach, since exploitation depends on write access to the Partner model; treat all Partner cmd_receive/cmd_send values as untrusted and audit existing Partner records for injected shell metacharacters (;, |, &&, $(), backticks); and run the application under a least-privilege OS account inside a container so that any triggered command executes with minimal blast radius rather than as root. If the post-receive/post-send command hooks are not needed, remove or blank these fields to eliminate the sink entirely, accepting the trade-off of losing custom payload post-processing. Monitor the vendor repository at https://github.com/abhishek-ram/django-pyas2 for a patched release and upgrade as soon as one that replaces os.system() with a sanitized subprocess call (no shell) is published.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-78 – OS Command Injection
View allSame technique Command Injection
View allShare
External POC / Exploit Code
Leaving vuln.today