Skip to content
OpenAdvisories
Medium · 5.4 CVE-2022-39348 EUVD-2022-7164GHSA-vg46-2rrj-3647PYSEC-2026-1055

Twisted vulnerable to NameVirtualHost Host header injection

Published Oct 26, 2022 · Updated Nov 3, 2025 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
twisted twisted >= 0.9.4, < 22.10.0rc1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 twisted 22.4.0-4 —
Debian 13 twisted 22.4.0-4 —
Debian 12 twisted 22.4.0-4 —
Debian 11 twisted 20.3.0-7+deb11u2 DLA-3970-1
Debian 10 twisted 18.9.0-3+deb10u2 DLA-3212-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS twisted 22.1.0-2ubuntu2.4 USN-6575-1
Ubuntu 20.04 LTS twisted 18.9.0-11ubuntu0.20.04.3 USN-6575-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS twisted No fix yet —
Ubuntu Pro 16.04 LTS twisted No fix yet —
Ubuntu Pro 14.04 LTS twisted No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP4 python-Twisted 22.2.0-150400.5.7.1 SUSE-SU-2022:4000-1
SLES 15 SP3 python-Twisted 19.10.0-150200.3.18.1 SUSE-SU-2022:4057-1
SLES 12 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE OpenStack Cloud Crowbar 9 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
SUSE OpenStack Cloud Crowbar 8 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
SUSE OpenStack Cloud 9 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
SUSE OpenStack Cloud 8 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
SUSE HPE Helion OpenStack 8 python-Twisted 15.2.1-9.23.1 SUSE-SU-2022:4074-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Twisted 22.10.0-1.1 openSUSE-SU-2024:12474-1
openSUSE Leap 15.4 python-Twisted 19.10.0-150200.3.18.1 SUSE-SU-2022:4057-1, SUSE-SU-2022:4000-1
openSUSE Leap 15.3 python-Twisted 19.10.0-150200.3.18.1 SUSE-SU-2022:4057-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-twisted +1 22.4.0-125.amzn2023.0.2 ALAS2023-2023-130
Amazon Linux 2 python-twisted-web 12.1.0-8.amzn2.0.1 ALAS2-2023-2008

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) python-twisted 22.10.0-2 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI twisted >= 0.9.4, < 22.10.0rc1 22.10.0rc1 GHSA-vg46-2rrj-3647

Advisories 10

References