{"answers":{"affected":"3 open source packages ship an affected version, including pyspector. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33140 exists.","fix":"Upgrade pyspector to 0.1.7 or later.","what":"CVE-2026-33140 is a medium-severity cross-site scripting vulnerability in ParzivalHack PySpector, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-33140 and fix it if it is affected.\n\nWhat it is: CVE-2026-33140 is a medium-severity cross-site scripting vulnerability in ParzivalHack PySpector, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33140 exists.\n\nAffected packages and fixed versions:\n- pyspector (PyPI): affected all versions; fixed in 0.1.7\n- pyspector (PyPI): affected all versions; fixed in 0.1.7\n- pyspector (PyPI): affected all versions; fixed in 0.1.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-33140/ (Markdown: https://insights.sbomify.com/CVE-2026-33140/index.md)","id":"CVE-2026-33140","markdown":"https://insights.sbomify.com/CVE-2026-33140/index.md","name":"CVE-2026-33140","record":{"aliases":["GHSA-2gmv-2r3v-jxj2","PYSEC-2026-3029"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python SAST tool","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in a developer's browser by crafting Python files that trigger unsanitized output in PySpector HTML reports.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"pyspector","vendor":"parzivalhack"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"PySpector is a static analysis security testing (SAST) Framework engineered for modern Python development workflows. PySpector versions 0.1.6 and prior are affected by a stored Cross-Site Scripting (XSS) vulnerability in the HTML report generator. When PySpector scans a Python file containing JavaScript payloads (i.e. inside a string passed to eval() ), the flagged code snippet is interpolated into the HTML report without sanitization. Opening the generated report in a browser causes the embedded JavaScript to execute in the browser's local file context. This issue has been patched in version 0.1.7.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"PySpector: Stored XSS in PySpector HTML Report Generation leads to Javascript Code Execution","id":"CVE-2026-33140","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":3,"n_references":1,"next":{"headline":"Chamilo LMS has an IDOR in REST API Stats Endpoint Exposes Any User's Learning Data","id":"CVE-2026-33141"},"packages":[{"ecosystem":"PyPI","fixed":["0.1.7"],"introduced":["0"],"last_affected":[],"package":"pyspector","purl":null,"source":"GHSA-2gmv-2r3v-jxj2"},{"ecosystem":"PyPI","fixed":["0.1.7"],"introduced":["0"],"last_affected":[],"package":"pyspector","purl":"pkg:pypi/pyspector","source":"GHSA-2gmv-2r3v-jxj2"},{"ecosystem":"PyPI","fixed":["0.1.7"],"introduced":["0"],"last_affected":[],"package":"pyspector","purl":"pkg:pypi/pyspector","source":"PYSEC-2026-3029"}],"prev":{"headline":"PySpector: Plugin Sandbox Bypass leads to Arbitrary Code Execution","id":"CVE-2026-33139"},"products":["PySpector"],"published":"2026-03-20","related":[{"cvss_score":8.3,"headline":"PySpector: Plugin Sandbox Bypass leads to Arbitrary Code Execution","id":"CVE-2026-33139","kev_date_added":null,"published":"2026-03-20"},{"cvss_score":6.9,"headline":"PySpector has a Plugin Code Execution Bypass via Incomplete Static Analysis in PluginSecurity.validate_plugin_code","id":"CVE-2026-41206","kev_date_added":null,"published":"2026-04-23"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-03-24","vendors":["ParzivalHack"]},"summary":"Attackers can execute arbitrary JavaScript in a developer's browser by crafting Python files that trigger unsanitized output in PySpector HTML reports.","url":"https://insights.sbomify.com/CVE-2026-33140/"}