CVE-2022-39348: Twisted vulnerable to NameVirtualHost Host header injection
Vulnerability summary
CVE-2022-39348 is a medium (CVSS 5.4) vulnerability in debian debian_linux. EPSS estimates a 1.59% chance of exploitation in the next 30 days, higher than 75.6% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3 · Related 2Timeline
- 26-10-2022PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
Description
Twisted is an event-based framework for internet applications. Started with version 0.9.4, when the host header does not match a configured host `twisted.web.vhost.NameVirtualHost` will return a `NoResource` resource which renders the Host header unescaped into the 404 response allowing HTML and script injection. In practice this should be very difficult to exploit as being able to modify the Host header of a normal HTTP request implies that one is already in a privileged position. This issue was fixed in version 22.10.0rc1. There are no known workarounds.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · PypiEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- OSV · UbuntuEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- NVDNIST5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
1.59%
Chance of exploitation in the next 30 days
Percentile
76%
Versus all other CVEs
30-day change
Increase +0.32 pp
From 1.27% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundTwisted
Maturity: poc
Weaknesses
CWE · root cause- CWE-79Improper Neutralization of Input During Web Page GenerationThe product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- CWE-80Improper Neutralization of Script-Related HTML Tags in a Web PageThe product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.
Affected systems
Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Opensuse3 products
- python-Twisted&distro=openSUSE Leap 15.3< 19.10.0-150200.3.18.1
- python-Twisted&distro=openSUSE Leap 15.4< 22.2.0-150400.5.7.1 | < 19.10.0-150200.3.18.1
- python-Twisted&distro=openSUSE Tumbleweed< 22.10.0-1.1
Suse3 products
- python-Twisted&distro=SUSE Linux Enterprise Module for Package Hub 15 SP3< 19.10.0-150200.3.18.1
- python-Twisted&distro=SUSE Linux Enterprise Module for Server Applications 15 SP3< 19.10.0-150200.3.18.1
- python-Twisted&distro=SUSE Linux Enterprise Module for Server Applications 15 SP4< 22.2.0-150400.5.7.1
Debian2 products
- twisted< 18.9.0-3+deb10u2 | < 22.4.0-4
- debian_linuxEOL10.0
Mageia1 product
- python-twisted< 22.10.0-1.mga8
PyPI1 product
- twisted≥ 0.9.4, < 22.10.0rc1
Twisted1 product
- twisted≥ 0.9.4, < 22.10.0rc1 | ≥ 0.9.4, < 22.10.0
Ubuntu1 product
- twistedAll versions (No fix recorded) | < 18.9.0-11ubuntu0.20.04.3 | < 22.1.0-2ubuntu2.4
7 vendors · 12 products
References
23 links- github.com/twisted/twisted/security/advisories/GHSA-vg46-2rrj-3647WEBREPORTExploitPatchThird Party Advisory
Show all 23 references
- github.com/twisted/twistedPACKAGE
- pypi.org/project/twistedPACKAGE