The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-33140

CVE-2026-33140: Parzivalhack Pyspector XSS Vulnerability

CVE-2026-33140 is a stored Cross-Site Scripting flaw in Parzivalhack Pyspector's HTML report generator that executes malicious JavaScript when reports are opened. This post covers technical details, affected versions, and fixes.

Published: March 27, 2026

CVE-2026-33140 Overview

CVE-2026-33140 is a stored Cross-Site Scripting (XSS) vulnerability affecting PySpector, a static analysis security testing (SAST) framework designed for modern Python development workflows. The vulnerability exists in the HTML report generator component, where flagged code snippets containing JavaScript payloads are interpolated into HTML reports without proper sanitization. When a user opens a generated report in a browser, embedded malicious JavaScript executes within the browser's local file context.

Critical Impact

Attackers can craft malicious Python files that, when scanned by PySpector, inject JavaScript into the generated HTML reports. Opening these reports triggers script execution in the victim's browser, potentially leading to information theft, session hijacking, or further attacks in the local file context.

Affected Products

  • PySpector versions 0.1.6 and prior
  • parzivalhack pyspector (Python package)

Discovery Timeline

  • 2026-03-20 - CVE CVE-2026-33140 published to NVD
  • 2026-03-24 - Last updated in NVD database

Technical Details for CVE-2026-33140

Vulnerability Analysis

This stored XSS vulnerability (CWE-79) occurs in PySpector's HTML report generation process. When PySpector performs static analysis on Python source files, it identifies potentially dangerous code patterns such as calls to eval() and includes the flagged code snippets in the generated HTML report. The vulnerability stems from the report generator's failure to sanitize these code snippets before embedding them in the HTML output.

An attacker can exploit this by crafting a Python file containing JavaScript payloads within strings that PySpector will flag during analysis. For example, a string passed to eval() containing a <script> tag will be flagged as a security issue, but when included in the HTML report, the script tags are interpreted by the browser as executable JavaScript rather than display text.

The attack requires user interaction—specifically, a victim must open the malicious HTML report in a web browser. The JavaScript then executes in the browser's local file context (file:// protocol), which can provide access to local files and other sensitive information depending on browser security configurations.

Root Cause

The root cause is improper output encoding in PySpector's HTML report generator. When code snippets are extracted from scanned Python files and inserted into the HTML template, special HTML characters like <, >, &, and quotes are not properly escaped or encoded. This allows malicious content within the scanned files to break out of the intended text context and be interpreted as HTML/JavaScript by the browser.

Attack Vector

The attack follows a network-based delivery model where an attacker provides a malicious Python file to be scanned by PySpector. This could occur in several scenarios:

  1. Supply Chain Attack: An attacker contributes a malicious Python file to a shared repository that undergoes automated SAST scanning
  2. Direct File Submission: In environments where PySpector is used as a service, attackers submit crafted Python files
  3. Social Engineering: An attacker convinces a developer to scan a malicious file

The vulnerability allows execution of arbitrary JavaScript when the generated HTML report is viewed in a browser. While the attack requires passive user interaction (opening the report), the payloads persist in the generated reports, enabling time-delayed attacks.

The vulnerability mechanism involves malicious JavaScript payloads embedded within Python code strings that PySpector flags during analysis. When the report generator includes these flagged snippets without sanitization, the JavaScript becomes executable HTML content. For detailed technical information, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-33140

Indicators of Compromise

  • HTML reports generated by PySpector versions 0.1.6 and earlier containing unescaped <script> tags or event handlers within code snippets
  • Python files submitted for scanning containing suspicious JavaScript payloads within string literals
  • Browser console errors or unusual network requests when opening PySpector HTML reports
  • Evidence of local file access attempts from the file:// protocol context

Detection Strategies

  • Implement file integrity monitoring on PySpector-generated HTML reports to detect unexpected JavaScript content
  • Deploy browser-based XSS detection extensions to alert on suspicious script execution from local files
  • Review submitted Python files for patterns indicative of XSS payloads before scanning
  • Monitor for unusual browser behavior when accessing SAST tool outputs

Monitoring Recommendations

  • Audit PySpector version deployments across development environments and CI/CD pipelines
  • Implement content security policies (CSP) for HTML report viewing environments where possible
  • Log and monitor access patterns to generated HTML reports for anomalous activity
  • Establish baseline behavior for PySpector report generation and alert on deviations

How to Mitigate CVE-2026-33140

Immediate Actions Required

  • Upgrade PySpector to version 0.1.7 or later immediately across all development environments
  • Review previously generated HTML reports for potential malicious content before opening
  • Temporarily disable HTML report generation if upgrade cannot be performed immediately
  • Consider using alternative output formats (JSON, plain text) until patched version is deployed

Patch Information

The vulnerability has been addressed in PySpector version 0.1.7. The patch implements proper HTML encoding for code snippets included in generated reports, ensuring that special characters are escaped and cannot be interpreted as executable HTML or JavaScript. Users should update their PySpector installation using their package manager.

For complete patch details and additional security information, consult the GitHub Security Advisory GHSA-2gmv-2r3v-jxj2.

Workarounds

  • Avoid opening HTML reports generated by vulnerable PySpector versions in web browsers
  • Use text-only viewing methods or convert reports to plain text before review
  • Implement manual HTML sanitization on generated reports using tools like DOMPurify before browser viewing
  • Configure browser security settings to restrict JavaScript execution for local files
bash
# Upgrade PySpector to patched version
pip install --upgrade pyspector>=0.1.7

# Verify installed version
pip show pyspector | grep Version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechParzivalhack

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33139: Parzivalhack Pyspector RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English