Vulnerabilities in pkg:pypi/pwntools
PACKAGECVE-2020-28468 is a CRITICAL (CVSS 9.8) pwntools server-side template injection (ssti) vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Pwntools libraries in the PyPI ecosystem. The issue involves pwntools server-side template injection (ssti) vulnerability. Remediation is available by upgrading affected packages to version 4.3.1.
pkg:pypi/pwntools
Vulnerability advisories affecting package pkg:pypi/pwntools. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7xc5-ggpp-g249 | CVE-2020-28468 | CRITICAL | pwntools Server-Side Template Injection (SSTI) vulnerability |
CVE-2020-28468 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-28468
To remediate this vulnerability, upgrade all affected Pwntools dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pwntools>=4.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pwntools
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-28468, inspect your installed packages using pip:
pip show pwntools
Analyze the terminal output to locate any version of Pwntools in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.1), your application is affected.
Note: The pip show pwntools command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Pwntools, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-28468 Affected Pwntools Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pwntools
|
PyPI |
< 4.3.1
|
4.3.1
|
References
Frequently Asked Questions
What is CVE-2020-28468?
Which Pwntools versions are affected?
What version fixes CVE-2020-28468?
Is pwntools affected?
What is the CVSS score of CVE-2020-28468?
What CWE is associated with CVE-2020-28468?
How can I check PyPI dependencies for CVE-2020-28468?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7xc5-ggpp-g249",
"modified" : "2024-10-18T21:58:01Z",
"published" : "2021-04-20T16:13:24Z",
"aliases" : [ "CVE-2020-28468" ],
"summary" : "pwntools Server-Side Template Injection (SSTI) vulnerability",
"details" : "This affects the package pwntools before 4.3.1. The shellcraft generator for affected versions of this module are vulnerable to Server-Side Template Injection (SSTI), which can lead to remote code execution.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pwntools"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28468"
}, {
"type" : "WEB",
"url" : "https://github.com/Gallopsled/pwntools/issues/1427"
}, {
"type" : "WEB",
"url" : "https://github.com/Gallopsled/pwntools/pull/1732"
}, {
"type" : "WEB",
"url" : "https://github.com/Gallopsled/pwntools/commit/138188eb1c027a2d0ffa4151511c407d3a001660"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Gallopsled/pwntools"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-7xc5-ggpp-g249"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pwntools/PYSEC-2021-72.yaml"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-PYTHON-PWNTOOLS-1047345"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-06T23:11:00Z",
"nvd_published_at" : "2021-01-08T12:15:00Z"
}
}