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-2022-31588

CVE-2022-31588: Testplatform Path Traversal Vulnerability

CVE-2022-31588 is a path traversal vulnerability in Testplatform caused by unsafe use of Flask send_file function. This post covers the technical details, affected versions, security impact, and mitigation strategies.

Published: February 17, 2026

CVE-2022-31588 Overview

CVE-2022-31588 is an absolute path traversal vulnerability affecting the zippies/testplatform repository on GitHub. The vulnerability exists due to unsafe usage of Flask's send_file function, which allows attackers to read arbitrary files from the server's filesystem by manipulating file path parameters.

Critical Impact

This path traversal vulnerability enables unauthenticated remote attackers to access sensitive files outside the intended directory, potentially exposing configuration files, credentials, source code, and other confidential data stored on the affected server.

Affected Products

  • testplatform_project testplatform (versions through 2016-07-19)

Discovery Timeline

  • 2022-07-11 - CVE-2022-31588 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-31588

Vulnerability Analysis

This vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), commonly known as path traversal or directory traversal. The root issue lies in how the testplatform application handles user-supplied file paths when serving files through Flask's send_file function.

When Flask's send_file function is invoked without proper validation of the file path argument, attackers can craft malicious requests containing directory traversal sequences or absolute paths to access files outside the application's intended web root. This can lead to unauthorized disclosure of sensitive system files, application configuration data, database credentials, and other confidential information stored on the server.

The network-based attack vector with no authentication requirements makes this vulnerability particularly dangerous, as any remote attacker with network access to the application can exploit it without needing valid credentials or user interaction.

Root Cause

The vulnerability stems from insufficient input validation when processing file path parameters passed to Flask's send_file function. The application fails to properly sanitize or restrict user-controlled input, allowing attackers to escape the intended directory structure using absolute paths (e.g., /etc/passwd) or relative path traversal sequences (e.g., ../../../etc/passwd).

Flask's send_file function, when used without setting the safe_join parameter or implementing path validation, will serve any file accessible to the application's process, regardless of whether it resides within the intended web directory.

Attack Vector

The attack is conducted over the network against the vulnerable Flask application. An attacker can exploit this vulnerability by:

  1. Identifying endpoints that serve files using the vulnerable send_file implementation
  2. Crafting HTTP requests with malicious file path parameters containing absolute paths or traversal sequences
  3. Accessing sensitive files such as /etc/passwd, application configuration files, or database credentials

Since this is a path traversal vulnerability with no code examples available, the exploitation involves sending HTTP requests with manipulated file path parameters. For detailed technical information, refer to the GitHub Security Lab Discussion.

Detection Methods for CVE-2022-31588

Indicators of Compromise

  • HTTP requests containing path traversal sequences such as ../, ..%2f, ..%252f, or URL-encoded variations targeting file-serving endpoints
  • Access logs showing requests for system files like /etc/passwd, /etc/shadow, or Windows equivalents
  • Unusual file access patterns in application logs indicating attempts to read files outside the web root
  • Error messages or stack traces revealing full filesystem paths in server responses

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block path traversal patterns in URL parameters
  • Configure intrusion detection systems (IDS) to alert on requests containing directory traversal sequences
  • Enable verbose logging on file-serving endpoints and monitor for suspicious file path requests
  • Conduct regular code reviews to identify unsafe usage of Flask's send_file function

Monitoring Recommendations

  • Monitor HTTP access logs for patterns indicative of directory traversal attempts
  • Set up alerts for any successful access to sensitive system files through the application
  • Track unusual spikes in 403/404 responses that may indicate reconnaissance activity
  • Implement file integrity monitoring on sensitive configuration files

How to Mitigate CVE-2022-31588

Immediate Actions Required

  • Identify all endpoints using Flask's send_file function and review their input validation
  • Implement strict input validation and path sanitization for all user-supplied file path parameters
  • Use Flask's safe_join function to securely construct file paths within a designated directory
  • Consider restricting file access to a specific whitelist of allowed files

Patch Information

The zippies/testplatform repository on GitHub appears to be unmaintained (last updated 2016-07-19). No official vendor patch is available for this vulnerability. Organizations using this code should implement their own mitigations or migrate to actively maintained alternatives.

For additional context on this vulnerability class, refer to the GitHub Security Lab Discussion.

Workarounds

  • Replace unsafe send_file usage with send_from_directory which restricts file serving to a specific directory
  • Implement a whitelist approach, only allowing access to explicitly defined files
  • Add input validation to reject paths containing traversal sequences or absolute paths
  • Deploy a web application firewall (WAF) to block path traversal attack patterns
bash
# Example secure Flask configuration using send_from_directory
# Instead of: send_file(user_supplied_path)
# Use: send_from_directory(app.config['UPLOAD_FOLDER'], filename)

# Ensure UPLOAD_FOLDER is set to a restricted directory
export FLASK_UPLOAD_FOLDER=/var/www/app/uploads

# Additional validation can be added:
# - Validate filename against allowed patterns
# - Use werkzeug.utils.secure_filename() to sanitize filenames
# - Implement access controls to verify user authorization

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechTestplatform

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.43%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Security Lab Discussion
  • Latest CVEs
  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability

  • CVE-2026-40259: SiYuan Auth Bypass Vulnerability

  • CVE-2026-40255: AdonisJS HTTP Server CSRF 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