CVE-2025-66469: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zauberzeug nicegui
NiceGUI is a Python-based UI framework. Versions 3.3.1 and below are vulnerable to Reflected XSS through its ui.add_css, ui.add_scss, and ui.add_sass functions. The functions lack proper sanitization or encoding for the JavaScript context they generate. An attacker can break out of the intended <style> or <script> tags by injecting closing tags (e.g., </style> or </script>), allowing for the execution of arbitrary JavaScript. This issue is fixed in version 3.4.0.
AI Analysis
Technical Summary
CVE-2025-66469 is a reflected Cross-site Scripting (XSS) vulnerability identified in the Python-based UI framework NiceGUI, specifically affecting versions 3.3.1 and earlier. The vulnerability stems from insufficient input neutralization in the functions ui.add_css, ui.add_scss, and ui.add_sass. These functions are designed to inject CSS or SCSS code into the web page but fail to properly sanitize or encode user-supplied input within the JavaScript context. An attacker can exploit this by injecting closing tags such as </style> or </script>, effectively breaking out of the intended style or script blocks and inserting arbitrary JavaScript code. This malicious script can then execute in the context of the victim’s browser, leading to potential theft of sensitive information, session hijacking, or manipulation of the web application’s behavior. The vulnerability does not require authentication but does require user interaction, such as clicking a crafted link or visiting a malicious page. The scope of impact is limited to confidentiality and integrity, with no direct availability impact. The issue has been addressed in NiceGUI version 3.4.0, which includes proper sanitization and encoding to prevent tag injection. No known exploits have been reported in the wild as of the publication date. The CVSS v3.1 base score is 6.1, reflecting a medium severity level due to the ease of exploitation and potential impact on user data and application integrity.
Potential Impact
For European organizations, the impact of CVE-2025-66469 can be significant if they use NiceGUI versions prior to 3.4.0 in their web applications. Successful exploitation could allow attackers to execute arbitrary JavaScript in users’ browsers, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of users. This compromises confidentiality and integrity of user data and application state. Industries relying on web-based dashboards, control panels, or internal tools built with NiceGUI are particularly at risk. The vulnerability could also be leveraged as a stepping stone for further attacks within an organization’s network. Although no availability impact is expected, the reputational damage and regulatory consequences under GDPR for data breaches involving personal data could be substantial. The requirement for user interaction limits mass exploitation but targeted phishing or social engineering campaigns could be effective. Organizations with public-facing NiceGUI applications should prioritize patching to mitigate risk.
Mitigation Recommendations
1. Upgrade all NiceGUI instances to version 3.4.0 or later, where the vulnerability is fixed with proper input sanitization and encoding. 2. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and reduce the impact of potential XSS attacks. 3. Conduct code reviews and security testing on any custom extensions or integrations using ui.add_css, ui.add_scss, or ui.add_sass to ensure no unsafe input is passed. 4. Educate users and administrators about phishing risks and the importance of not clicking suspicious links that could trigger reflected XSS. 5. Monitor web application logs and user reports for signs of unusual activity or exploitation attempts. 6. Employ web application firewalls (WAFs) with rules tuned to detect and block XSS payloads targeting NiceGUI endpoints. 7. For internal applications, restrict access to trusted users and networks to reduce exposure. 8. Regularly update dependencies and frameworks to incorporate security patches promptly.
Affected Countries
Germany, United Kingdom, France, Netherlands, Sweden, Finland
CVE-2025-66469: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zauberzeug nicegui
Description
NiceGUI is a Python-based UI framework. Versions 3.3.1 and below are vulnerable to Reflected XSS through its ui.add_css, ui.add_scss, and ui.add_sass functions. The functions lack proper sanitization or encoding for the JavaScript context they generate. An attacker can break out of the intended <style> or <script> tags by injecting closing tags (e.g., </style> or </script>), allowing for the execution of arbitrary JavaScript. This issue is fixed in version 3.4.0.
AI-Powered Analysis
Technical Analysis
CVE-2025-66469 is a reflected Cross-site Scripting (XSS) vulnerability identified in the Python-based UI framework NiceGUI, specifically affecting versions 3.3.1 and earlier. The vulnerability stems from insufficient input neutralization in the functions ui.add_css, ui.add_scss, and ui.add_sass. These functions are designed to inject CSS or SCSS code into the web page but fail to properly sanitize or encode user-supplied input within the JavaScript context. An attacker can exploit this by injecting closing tags such as </style> or </script>, effectively breaking out of the intended style or script blocks and inserting arbitrary JavaScript code. This malicious script can then execute in the context of the victim’s browser, leading to potential theft of sensitive information, session hijacking, or manipulation of the web application’s behavior. The vulnerability does not require authentication but does require user interaction, such as clicking a crafted link or visiting a malicious page. The scope of impact is limited to confidentiality and integrity, with no direct availability impact. The issue has been addressed in NiceGUI version 3.4.0, which includes proper sanitization and encoding to prevent tag injection. No known exploits have been reported in the wild as of the publication date. The CVSS v3.1 base score is 6.1, reflecting a medium severity level due to the ease of exploitation and potential impact on user data and application integrity.
Potential Impact
For European organizations, the impact of CVE-2025-66469 can be significant if they use NiceGUI versions prior to 3.4.0 in their web applications. Successful exploitation could allow attackers to execute arbitrary JavaScript in users’ browsers, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of users. This compromises confidentiality and integrity of user data and application state. Industries relying on web-based dashboards, control panels, or internal tools built with NiceGUI are particularly at risk. The vulnerability could also be leveraged as a stepping stone for further attacks within an organization’s network. Although no availability impact is expected, the reputational damage and regulatory consequences under GDPR for data breaches involving personal data could be substantial. The requirement for user interaction limits mass exploitation but targeted phishing or social engineering campaigns could be effective. Organizations with public-facing NiceGUI applications should prioritize patching to mitigate risk.
Mitigation Recommendations
1. Upgrade all NiceGUI instances to version 3.4.0 or later, where the vulnerability is fixed with proper input sanitization and encoding. 2. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and reduce the impact of potential XSS attacks. 3. Conduct code reviews and security testing on any custom extensions or integrations using ui.add_css, ui.add_scss, or ui.add_sass to ensure no unsafe input is passed. 4. Educate users and administrators about phishing risks and the importance of not clicking suspicious links that could trigger reflected XSS. 5. Monitor web application logs and user reports for signs of unusual activity or exploitation attempts. 6. Employ web application firewalls (WAFs) with rules tuned to detect and block XSS payloads targeting NiceGUI endpoints. 7. For internal applications, restrict access to trusted users and networks to reduce exposure. 8. Regularly update dependencies and frameworks to incorporate security patches promptly.
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-02T15:43:16.586Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6937671f9bbcd7dc91cb4c94
Added to database: 12/9/2025, 12:02:39 AM
Last enriched: 12/9/2025, 12:17:35 AM
Last updated: 12/10/2025, 11:52:48 PM
Views: 42
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-67514
UnknownCVE-2025-67512
UnknownCVE-2025-67509: CWE-94: Improper Control of Generation of Code ('Code Injection') in neuron-core neuron-ai
HighCVE-2025-67510: CWE-250: Execution with Unnecessary Privileges in neuron-core neuron-ai
CriticalCVE-2025-67513: CWE-521: Weak Password Requirements in FreePBX security-reporting
MediumActions
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.