CPython: Improper Neutralization of Special Elements used in a Command
CVE-2026-4786 is a high-severity improper neutralization of special elements used in a command vulnerability in CPython from Python Software Foundation, with a CVSS 3.1 base score of 7.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists versions 3.10.21, 3.11.16, 3.12.14 as the first without the flaw, so updating CPython to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.29% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update CPython to 3.10.21 or 3.11.16 or 3.12.14 or 3.13.14, whichever matches your release line, or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- LowPerformance or availability is reduced.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L. Scored by CNA.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 7.0 | High | CNA (python.org) |
| CVSS 3.1 | 7.1 | High | CNA |
Official description
Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain browser types the "webbrowser.open()" API could have commands injected into the underlying shell. See CVE-2026-4519 for details.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Special Elements used in a Command
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
How developers prevent this class of flaw
- If at all possible, use library calls rather than external processes to recreate the desired functionality.
- If possible, ensure that all external commands called from the program are statically created.
- Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
More Improper Neutralization of Special Elements used in a Command vulnerabilities (CWE-77)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/python/cpython/commit/28b4ad38067bbdad34edfcd03ad2de5f06387e53
- github.com/python/cpython/commit/a4d3edf3a6ecfde504d02126410d2a65a859b744
- github.com/python/cpython/commit/c5767a72838a8dda9d6dc5d3558075b055c56bca
- github.com/python/cpython/commit/d22922c8a7958353689dc4763dd72da2dea03fff
- github.com/python/cpython/commit/d6d68494be70bdbda20f89f83801ba52ec37daa4
- github.com/python/cpython/commit/f4654824ae0850ac87227fb270f9057477946769
- github.com/python/cpython/pull/148170
Other references
- github.com/python/cpython/issues/148169
- mail.python.org/archives/list/[email protected]/thread/JQDUNJVB4AQNTJECSUKOBDU3XCJIPSE5/
- access.redhat.com/errata/RHSA-2026:10117
- access.redhat.com/errata/RHSA-2026:10140
- access.redhat.com/errata/RHSA-2026:10141
- access.redhat.com/errata/RHSA-2026:10711
- access.redhat.com/errata/RHSA-2026:10745
- access.redhat.com/errata/RHSA-2026:10774
- access.redhat.com/errata/RHSA-2026:10949
- access.redhat.com/errata/RHSA-2026:10950
- access.redhat.com/errata/RHSA-2026:11062
- access.redhat.com/errata/RHSA-2026:11077
- access.redhat.com/errata/RHSA-2026:11768
- access.redhat.com/errata/RHSA-2026:13692
- access.redhat.com/errata/RHSA-2026:13812
Other vulnerabilities in CPython
- 8.2 High severity
- 9.4 Critical severity
- 7.6 High severity
- 9.2 Critical severity
- 8.4 High severity
- 7.5 High severity
Recent Improper Neutralization of Special Elements used in a Command vulnerabilities
- 9.8 Critical severity
- 7.3 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
Spotted an error? Tell us.