{"id":"CVE-2024-41810","published":"2024-07-29T15:41:40Z","modified":"2025-11-03T22:01:01Z","title":"HTML injection in HTTP redirect body","vendor":"twisted","product":"twisted","tier":"tail","description":{"text":"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 the redirect response HTML body. This vulnerability is fixed in 24.7.0rc1.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01211,"percentile":0.69194,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"references":[{"url":"https://github.com/twisted/twisted/security/advisories/GHSA-cf56-g6w6-pqq2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/twisted/twisted/commit/046a164f89a0f08d3239ecebd750360f8914df33","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/11/msg00028.html","tags":[]}],"priority":{"score":23.1,"factors":[{"name":"EPSS percentile","points":13.84},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.27}]},"exploitSources":{"nuclei":[{"id":"CVE-2024-41810","name":"Twisted - Open Redirect & XSS","severity":"medium","path":"http/cves/2024/CVE-2024-41810.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-41810.yaml"}],"provenance":"source"},"vendorSlug":"twisted","affectedVersions":[{"vendor":"twisted","product":"twisted","versions":["<= 24.3.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-07-29T16:39:25.608484Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"twisted","vulnerableRanges":["<24.7.0rc1"],"patched":["24.7.0rc1"],"from":["GHSA-cf56-g6w6-pqq2","PYSEC-2024-75"],"provenance":"source"}],"summary":{"text":"The flaw is an HTML injection in the twisted.web.util.redirectTo function of the Twisted event-based framework for internet applications, which affects the HTTP redirect response body. An attacker who can influence the redirect URL that application code passes to this function can inject HTML into the redirect response, enabling reflected cross-site scripting, and this requires network access and a victim user to interact with the crafted link, with the attack depending on application code allowing attacker control of that URL.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:38:24Z"},"euvd":{"id":"EUVD-2024-0167","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-twisted-cve-2020-10108","parents":[{"from":"CVE-2022-39348","to":"CVE-2024-41810","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/twisted/web/_template_util.py"],"commits":["https://github.com/twisted/twisted/commit/f2f5e81c03f14e253e85fe457e646130780db40b","https://github.com/twisted/twisted/commit/f49041bb67792506d85aeda9cf6157e92f8048f4","https://github.com/twisted/twisted/commit/046a164f89a0f08d3239ecebd750360f8914df33"],"basis":"rarely changed file"}]}]}}