CVE-2025-67724: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in tornadoweb tornado
Tornado is a Python web framework and asynchronous networking library. In versions 6.5.2 and below, the supplied reason phrase is used unescaped in HTTP headers (where it could be used for header injection) or in HTML in the default error page (where it could be used for XSS) and can be exploited by passing untrusted or malicious data into the reason argument. Used by both RequestHandler.set_status and tornado.web.HTTPError, the argument is designed to allow applications to pass custom "reason" phrases (the "Not Found" in HTTP/1.1 404 Not Found) to the HTTP status line (mainly for non-standard status codes). This issue is fixed in version 6.5.3.
AI Analysis
Technical Summary
CVE-2025-67724 affects Tornado, a popular Python web framework and asynchronous networking library, in versions 6.5.2 and earlier. The vulnerability stems from improper escaping of the 'reason' phrase used in HTTP status lines, which is passed unescaped into HTTP headers and HTML error pages. Specifically, the reason argument in RequestHandler.set_status and tornado.web.HTTPError allows applications to specify custom reason phrases (e.g., the 'Not Found' in '404 Not Found'). Because this input is not sanitized, an attacker can inject malicious content that results in cross-site scripting (CWE-79) when rendered in the default error page, or HTTP header injection (CWE-644) when included in HTTP headers. This can be exploited by supplying crafted input to the reason parameter, potentially leading to execution of arbitrary scripts in the victim's browser or manipulation of HTTP headers. The vulnerability requires no privileges and no authentication but does require user interaction (e.g., a victim visiting a maliciously crafted URL). The CVSS v3.1 base score is 5.4 (medium severity), reflecting limited confidentiality and integrity impacts and no availability impact. The issue was fixed in Tornado version 6.5.3 by properly escaping the reason phrase before inclusion in headers and HTML. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to web applications built on Tornado versions below 6.5.3 that utilize custom HTTP status reason phrases. Successful exploitation can lead to cross-site scripting attacks, enabling attackers to steal session cookies, perform actions on behalf of users, or deliver malicious payloads. HTTP header injection could also facilitate cache poisoning or redirect attacks. While the impact on confidentiality and integrity is limited, such attacks can undermine user trust and lead to data leakage or unauthorized actions. Organizations in sectors with high web exposure—such as finance, government, healthcare, and critical infrastructure—are at greater risk. Additionally, compliance with GDPR and other data protection regulations may be impacted if personal data is compromised through XSS attacks. The lack of known exploits reduces immediate risk but does not eliminate the threat, especially as attackers may develop exploits post-disclosure.
Mitigation Recommendations
European organizations should immediately upgrade Tornado to version 6.5.3 or later to ensure the vulnerability is patched. For applications where immediate upgrade is not feasible, developers should implement input validation and sanitization on any user-supplied data passed to the reason argument, ensuring that special characters are properly escaped before inclusion in HTTP headers or HTML content. Employing Content Security Policy (CSP) headers can help mitigate the impact of potential XSS attacks by restricting script execution. Web Application Firewalls (WAFs) should be configured to detect and block suspicious inputs targeting the reason parameter. Regular security testing, including automated scanning and manual code reviews focusing on HTTP status handling, is recommended. Monitoring for unusual HTTP header manipulations or error page behaviors can provide early detection of exploitation attempts. Finally, educating developers about secure coding practices related to HTTP response construction is essential to prevent similar issues.
Affected Countries
Germany, United Kingdom, France, Netherlands, Sweden, Finland, Ireland
CVE-2025-67724: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in tornadoweb tornado
Description
Tornado is a Python web framework and asynchronous networking library. In versions 6.5.2 and below, the supplied reason phrase is used unescaped in HTTP headers (where it could be used for header injection) or in HTML in the default error page (where it could be used for XSS) and can be exploited by passing untrusted or malicious data into the reason argument. Used by both RequestHandler.set_status and tornado.web.HTTPError, the argument is designed to allow applications to pass custom "reason" phrases (the "Not Found" in HTTP/1.1 404 Not Found) to the HTTP status line (mainly for non-standard status codes). This issue is fixed in version 6.5.3.
AI-Powered Analysis
Technical Analysis
CVE-2025-67724 affects Tornado, a popular Python web framework and asynchronous networking library, in versions 6.5.2 and earlier. The vulnerability stems from improper escaping of the 'reason' phrase used in HTTP status lines, which is passed unescaped into HTTP headers and HTML error pages. Specifically, the reason argument in RequestHandler.set_status and tornado.web.HTTPError allows applications to specify custom reason phrases (e.g., the 'Not Found' in '404 Not Found'). Because this input is not sanitized, an attacker can inject malicious content that results in cross-site scripting (CWE-79) when rendered in the default error page, or HTTP header injection (CWE-644) when included in HTTP headers. This can be exploited by supplying crafted input to the reason parameter, potentially leading to execution of arbitrary scripts in the victim's browser or manipulation of HTTP headers. The vulnerability requires no privileges and no authentication but does require user interaction (e.g., a victim visiting a maliciously crafted URL). The CVSS v3.1 base score is 5.4 (medium severity), reflecting limited confidentiality and integrity impacts and no availability impact. The issue was fixed in Tornado version 6.5.3 by properly escaping the reason phrase before inclusion in headers and HTML. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to web applications built on Tornado versions below 6.5.3 that utilize custom HTTP status reason phrases. Successful exploitation can lead to cross-site scripting attacks, enabling attackers to steal session cookies, perform actions on behalf of users, or deliver malicious payloads. HTTP header injection could also facilitate cache poisoning or redirect attacks. While the impact on confidentiality and integrity is limited, such attacks can undermine user trust and lead to data leakage or unauthorized actions. Organizations in sectors with high web exposure—such as finance, government, healthcare, and critical infrastructure—are at greater risk. Additionally, compliance with GDPR and other data protection regulations may be impacted if personal data is compromised through XSS attacks. The lack of known exploits reduces immediate risk but does not eliminate the threat, especially as attackers may develop exploits post-disclosure.
Mitigation Recommendations
European organizations should immediately upgrade Tornado to version 6.5.3 or later to ensure the vulnerability is patched. For applications where immediate upgrade is not feasible, developers should implement input validation and sanitization on any user-supplied data passed to the reason argument, ensuring that special characters are properly escaped before inclusion in HTTP headers or HTML content. Employing Content Security Policy (CSP) headers can help mitigate the impact of potential XSS attacks by restricting script execution. Web Application Firewalls (WAFs) should be configured to detect and block suspicious inputs targeting the reason parameter. Regular security testing, including automated scanning and manual code reviews focusing on HTTP status handling, is recommended. Monitoring for unusual HTTP header manipulations or error page behaviors can provide early detection of exploitation attempts. Finally, educating developers about secure coding practices related to HTTP response construction is essential to prevent similar issues.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-10T19:25:20.819Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 693badd05785fd87b5f80b8f
Added to database: 12/12/2025, 5:53:20 AM
Last enriched: 12/12/2025, 6:08:31 AM
Last updated: 12/12/2025, 10:36:23 PM
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-14583: Unrestricted Upload in campcodes Online Student Enrollment System
MediumCVE-2025-14582: Unrestricted Upload in campcodes Online Student Enrollment System
MediumCVE-2025-46289: An app may be able to access protected user data in Apple macOS
UnknownCVE-2025-46287: An attacker may be able to spoof their FaceTime caller ID in Apple macOS
UnknownCVE-2025-46285: An app may be able to gain root privileges in Apple macOS
UnknownActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.