CVE-2020-28468 Improper Control of Generation of Code ('Code Injection')
Attackers can execute arbitrary code via Server-Side Template Injection in the shellcraft generator of the pwntools library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-28468?
CVE-2020-28468 is a high-severity code injection vulnerability in pwntools, published on 8 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-74
Which versions are affected by CVE-2020-28468?
3 open source packages ship an affected version, including pwntools. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pwntools PyPI | All versions | 4.3.1 |
pwntools PyPI | All versions | 4.3.1 |
pwntools PyPI | All versions | 4.3.1 |
Products include Pwntools Project Pwntools.
How do I fix CVE-2020-28468?
Upgrade pwntools to 4.3.1 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2020-28468 being exploited?
There is no known exploitation of CVE-2020-28468 in the wild and no public exploit code.
Sources
Also known as GHSA-7xc5-ggpp-g249, PYSEC-2021-72, SNYK-PYTHON-PWNTOOLS-1047345.