GHSA-4M3G-6R7G-JV4F

GHSA-4M3G-6R7G-JV4F is a low-severity cross-site scripting (XSS) vulnerability in gradio_pdf (pip), affecting versions < 0.0.10. It is fixed in 0.0.10.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Arbitrary JavaScript execution due to using outdated libraries

gradio-pdf projects with dependencies on the pdf.js library are vulnerable to CVE-2024-4367, which allows arbitrary JavaScript execution.

PoC

  1. Generate a pdf file with a malicious script in the fontmatrix. (This will run alert(‘XSS’).)
    poc.pdf

  2. Run the app. In this PoC, I've used the demo for a simple proof.

  3. Upload a PDF file containing the script.

  4. Check that the script is running.

Mitigation

Upgrade the pdf.js to v4.2.67, which removes the vulnerability. (or set the option isEvalSupported to false.)

Reference

  1. https://codeanlabs.com/blog/research/cve-2024-4367-arbitrary-js-execution-in-pdf-js/
  2. https://github.com/mozilla/pdf.js/pull/18015

Impact

Malicious scripts can be injected into the code, and when linked with vulnerabilities such as CSRF, it can cause even greater damage. In particular, It can become a source of further attacks, especially when linked to social engineering.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

GHSA-4M3G-6R7G-JV4F has a CVSS score of 3.6 (Low). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.10); upgrading removes the vulnerable code path.

Affected versions

gradio_pdf (< 0.0.10)

Security releases

gradio_pdf → 0.0.10 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade gradio_pdf to 0.0.10 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-4M3G-6R7G-JV4F? GHSA-4M3G-6R7G-JV4F is a low-severity cross-site scripting (XSS) vulnerability in gradio_pdf (pip), affecting versions < 0.0.10. It is fixed in 0.0.10. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is GHSA-4M3G-6R7G-JV4F? GHSA-4M3G-6R7G-JV4F has a CVSS score of 3.6 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of gradio_pdf are affected by GHSA-4M3G-6R7G-JV4F? gradio_pdf (pip) versions < 0.0.10 is affected.
  4. Is there a fix for GHSA-4M3G-6R7G-JV4F? Yes. GHSA-4M3G-6R7G-JV4F is fixed in 0.0.10. Upgrade to this version or later.
  5. Is GHSA-4M3G-6R7G-JV4F exploitable, and should I be worried? Whether GHSA-4M3G-6R7G-JV4F is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-4M3G-6R7G-JV4F is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-4M3G-6R7G-JV4F? Upgrade gradio_pdf to 0.0.10 or later.

Stop the waste.
Protect your environment with Kodem.