Cyber Resilience

CVE-2024-41810

XSS in Twisted ≤ 24.3.0

Published
29 July 2024
Modified
03 November 2025
Patch / advisory
CVSS Score v3.1 6.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS Score 0.012 65th percentile
Risk Priority 71 floored blend · peak EPSS

Summary

CVE-2024-41810 is a medium-severity Cross-site Scripting (CWE-79) vulnerability in Twisted Twisted. Its CVSS base score is 6.1 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Browser Session Hijacking (T1185); ranked in the top 35% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

Twisted is an event-based framework for internet applications supporting Python 3.6 and later. The vulnerability resides in the twisted.web.util.redirectTo function, which contains an HTML injection flaw that produces reflected cross-site scripting in the redirect response HTML body when application code permits an attacker to control the redirect URL. It is tracked as CVE-2024-41810 with CVSS 6.1 and is associated with CWE-79 and CWE-80.

An unauthenticated remote attacker can supply a crafted redirect URL to a vulnerable application, resulting in execution of arbitrary script in the context of the victim's browser when the redirect response is rendered. This enables limited impacts such as data leakage or UI manipulation without requiring user authentication or special privileges beyond the ability to influence the URL parameter.

The issue is resolved in Twisted 24.7.0rc1, as detailed in the project's GitHub security advisory GHSA-cf56-g6w6-pqq2 and the corresponding commit that sanitizes the redirect target. Debian has also published an update addressing the flaw in its LTS distribution. The associated EPSS score remains near 0.68 with no material post-disclosure rise from a low baseline.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Twisted is an event-based framework for internet applications, supporting Python 3.6+. The `twisted.web.util.redirectTo` function contains an HTML injection vulnerability. If application code allows an attacker to control the redirect URL this vulnerability may result in Reflected Cross-Site Scripting (XSS) in…

more

the redirect response HTML body. This vulnerability is fixed in 24.7.0rc1.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1185 Browser Session Hijacking Collection
Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
T1659 Content Injection Initial Access
Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-34033Shared CWE-79, CWE-80
CVE-2024-49337Shared CWE-79, CWE-80
CVE-2024-45406Shared CWE-79, CWE-80
CVE-2023-47869Shared CWE-79, CWE-80
CVE-2024-37732Shared CWE-79, CWE-80
CVE-2025-25299Shared CWE-79, CWE-80
CVE-2024-6052Shared CWE-79, CWE-80
CVE-2023-30615Shared CWE-79, CWE-80
CVE-2023-20257Shared CWE-79, CWE-80
CVE-2024-42195Shared CWE-79, CWE-80

Affected Assets

twisted
twisted
≤ 24.3.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.1.2
  • V1.3.2
  • V1.2.1
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover missing or incorrect input neutralization through targeted web-application tests.

Input validation directly enforces neutralization of untrusted data before it reaches web output generation.

Output filtering can catch or sanitize unneutralized script content before it is served to users.

Secure engineering principles include mandatory output encoding and neutralization of HTML metacharacters to stop injection at the source.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly target introduction of XSS via coding standards/testing (mostly), yet the single broad outcome leaves many specific neutralization vectors unaddressed (partial).

PR.PS-02 partial match
prevents

Patching and EOL replacement can remediate known XSS instances in libraries or frameworks (partial) but do nothing to enforce input neutralization in application code (none).

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Secure-coding testing and automated code-analysis tools are applied to detect improper neutralization of script-related content during web-page generation.

prevents

Knowledge exchange on emerging attack techniques and patches reduces the likelihood that cross-site scripting flaws remain unaddressed in deployed applications.

prevents

Operational indicators of compromise for web-application attacks can be incorporated into WAF or input-filtering rules, lowering the likelihood that unsanitized data reaches the browser.

prevents

Requiring language-specific secure-coding standards and automated scanning during the SDLC catches missing output encoding or improper neutralization of untrusted data before the software reaches production.

prevents

Application security requirements explicitly call for neutralization of script-related HTML tags.

prevents

Secure-coding standards, SAST scans and removal of insecure code samples together eliminate the failure to neutralize script content that produces cross-site scripting flaws.

References