`), allowing for the execution of arbitrary JavaScript.\n\n###","datePublished":"2025-12-08T21:30:20Z","dateModified":"2025-12-09T17:33:19.199054Z","url":"https://o3.security/vulnerability/GHSA-72qc-wxch-74mg","inLanguage":"en","author":{"@id":"https://o3.security/#organization"},"publisher":{"@id":"https://o3.security/#organization"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://o3.security/vulnerability/GHSA-72qc-wxch-74mg"},"speakable":{"@type":"SpeakableSpecification","cssSelector":["h1",".vuln-summary",".vuln-severity",".vuln-mitigation"]},"about":[{"@type":"SoftwareApplication","name":"nicegui","applicationCategory":"PyPI","softwareVersion":"3.4.0"}],"citation":[{"@type":"WebPage","url":"https://github.com/zauberzeug/nicegui/security/advisories/GHSA-72qc-wxch-74mg"},{"@type":"WebPage","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66469"},{"@type":"WebPage","url":"https://github.com/zauberzeug/nicegui/commit/a8fd25b7d5e23afb1952d0f60a1940e18b5f1ca8"}]}`), allowing for the execution of arbitrary JavaScript.\n\n###","url":"https://o3.security/vulnerability/GHSA-72qc-wxch-74mg","identifier":"GHSA-72qc-wxch-74mg","datePublished":"2025-12-08T21:30:20Z","dateModified":"2025-12-09T17:33:19.199054Z","inLanguage":"en","keywords":["GHSA-72qc-wxch-74mg","MEDIUM severity","CWE-79","CVE","vulnerability","security advisory"],"creator":{"@id":"https://o3.security/#organization"},"isAccessibleForFree":true,"variableMeasured":[{"@type":"PropertyValue","name":"CVSS Base Score","value":6.1,"description":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"@type":"PropertyValue","name":"Severity","value":"MEDIUM"},{"@type":"PropertyValue","name":"EPSS Percentile","value":13}]}`), allowing for the execution of arbitrary JavaScript.\n\n### Details\nThe vulnerability stems from how these functions inject content into the DOM using `client."}},{"@type":"Question","name":"How severe is GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"GHSA-72qc-wxch-74mg has a CVSS score of 6.1/10, rated MEDIUM. Review your exposure and patch according to your risk tolerance."}},{"@type":"Question","name":"Which packages are affected by GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"GHSA-72qc-wxch-74mg affects the following packages: nicegui (PyPI). Ecosystems affected: PyPI."}},{"@type":"Question","name":"How do I fix GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"Update nicegui to 3.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-72qc-wxch-74mg is resolved across your whole dependency graph."}},{"@type":"Question","name":"How do I detect GHSA-72qc-wxch-74mg in my PyPI dependencies?","acceptedAnswer":{"@type":"Answer","text":"Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nicegui. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match."}},{"@type":"Question","name":"How do I mitigate GHSA-72qc-wxch-74mg if there is no patch (or I can't update yet)?","acceptedAnswer":{"@type":"Answer","text":"If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands."}},{"@type":"Question","name":"How does O3 Security protect against GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"O3 pinpoints whether GHSA-72qc-wxch-74mg is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed."}},{"@type":"Question","name":"Is GHSA-72qc-wxch-74mg actively exploited in the wild?","acceptedAnswer":{"@type":"Answer","text":"No public exploit code has been indexed for GHSA-72qc-wxch-74mg yet. This does not mean the vulnerability cannot be exploited — absence of public exploits does not imply safety. Apply the recommended fix and use O3 Security to monitor your exposure."}},{"@type":"Question","name":"What is the EPSS score for GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"GHSA-72qc-wxch-74mg has an EPSS (Exploit Prediction Scoring System) score of 0.2%, placing it in the 13th percentile of all CVEs. EPSS is maintained by FIRST.org and estimates the probability that a vulnerability will be exploited in the wild within the next 30 days. This score indicates relatively lower exploitation probability, though the CVSS severity should still guide your patching priority."}},{"@type":"Question","name":"What type of vulnerability is GHSA-72qc-wxch-74mg?","acceptedAnswer":{"@type":"Answer","text":"GHSA-72qc-wxch-74mg is classified as Cross-site Scripting (XSS) (CWE-79). This weakness type describe the underlying flaw category, which helps determine the potential impact and the right class of mitigation. This is a high-impact weakness class that often enables remote code execution or data exposure."}},{"@type":"Question","name":"When was GHSA-72qc-wxch-74mg published, and has it been updated?","acceptedAnswer":{"@type":"Answer","text":"GHSA-72qc-wxch-74mg was published on December 8, 2025 and was last updated on December 9, 2025. Advisory data evolves as severity scores, affected ranges, and exploit intelligence are revised — always check the latest version of the advisory before acting."}}]}
Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI

GHSA-72qc-wxch-74mg

MEDIUM

NiceGUI Reflected XSS in ui.add_css, ui.add_scss, and ui.add_sass via Style Injection

Also known asCVE-2025-66469
Published
Dec 8, 2025
Updated
Dec 9, 2025
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk13th percentile+0.18%
0.00%0.24%0.48%0.72%0.0%0.2%Jan 26Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐍nicegui

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

A Cross-Site Scripting (XSS) vulnerability exists in ui.add_css, ui.add_scss, and ui.add_sass functions in NiceGUI (v3.3.1 and earlier).

These functions allow developers to inject styles dynamically. However, they 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.

Details

The vulnerability stems from how these functions inject content into the DOM using client.run_javascript (or add_head_html internally) without sufficient escaping for the transport layer.

  • ui.add_css: Injects content into a <style> tag. Input containing </style> closes the tag prematurely, allowing subsequent HTML/JS injection.
  • ui.add_scss / ui.add_sass: These rely on client-side compilation within <script> tags. Input containing </script> breaks the execution context, allowing XSS.

PoC

Scenario: A developer allows users to customize a theme color via a URL parameter.

from nicegui import ui

@ui.page('/')
def main(color: str = 'blue'):
    # Vulnerable implementation of dynamic theming
    ui.add_css(f'.q-btn {{ background-color: {color} !important; }}')
    ui.button('Click Me')

ui.run(port=8082)

Attack Vector: Accessing the following URL executes arbitrary JavaScript: http://localhost:8082/?color=red;}</style><img src=x onerror=alert(document.domain)><style>

Impact

  • Type: Reflected XSS
  • Severity: Moderate
  • Affected Components: Applications using ui.add_css, ui.add_scss, or ui.add_sass with untrusted input (e.g., dynamic theming based on user input).

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIniceguiall versions3.4.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nicegui. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update nicegui to 3.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-72qc-wxch-74mg is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-72qc-wxch-74mg is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-72qc-wxch-74mg. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary A Cross-Site Scripting (XSS) vulnerability exists in `ui.add_css`, `ui.add_scss`, and `ui.add_sass` functions in NiceGUI (v3.3.1 and earlier). These functions allow developers to inject styles dynamically. However, they 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. ### Details The vulnerability stems from how these functions inject content into the DOM using `client.
O3 Security · Impact-Aware SCA

Is GHSA-72qc-wxch-74mg in your dependencies?

O3 detects GHSA-72qc-wxch-74mg across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.