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
    • 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-2025-61385

CVE-2025-61385: pg8000 SQL Injection Vulnerability

CVE-2025-61385 is a SQL injection flaw in tlocke pg8000 1.31.4 that enables remote attackers to execute arbitrary SQL commands through crafted Python list inputs. This article covers technical details, impact, and mitigation.

Published: March 11, 2026

CVE-2025-61385 Overview

CVE-2025-61385 is a SQL injection vulnerability affecting pg8000, a pure-Python PostgreSQL database driver. The vulnerability exists in the pg8000.native.literal function, which fails to properly sanitize specially crafted Python list inputs. Remote attackers can exploit this flaw to execute arbitrary SQL commands against the backend PostgreSQL database, potentially leading to complete database compromise, data exfiltration, or unauthorized data manipulation.

Critical Impact

This SQL injection vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands via the network, potentially compromising database confidentiality, integrity, and availability with cross-boundary impact.

Affected Products

  • pg8000 version 1.31.4 and potentially earlier versions
  • Applications using the pg8000.native.literal function with untrusted Python list inputs
  • PostgreSQL databases accessible via vulnerable pg8000 implementations

Discovery Timeline

  • 2025-10-27 - CVE-2025-61385 published to NVD
  • 2025-10-30 - Last updated in NVD database

Technical Details for CVE-2025-61385

Vulnerability Analysis

This SQL injection vulnerability (CWE-89) arises from improper input validation in the pg8000.native.literal function. When processing Python list inputs, the function fails to adequately escape or sanitize special characters and SQL metacharacters, allowing attackers to break out of the intended SQL context and inject malicious commands.

The vulnerability is particularly dangerous because pg8000 is designed as a database driver, meaning any exploitation occurs with the full privileges of the database connection. The attack requires user interaction but can have cross-site impact, affecting resources beyond the vulnerable component's security scope. Successful exploitation could allow attackers to read, modify, or delete database contents, execute stored procedures, or potentially gain further system access depending on database configuration.

Root Cause

The root cause is insufficient input sanitization in the pg8000.native.literal function when handling Python list data types. The function is intended to convert Python objects into SQL-safe literal representations, but the implementation does not properly escape nested values within lists, allowing crafted input to escape the literal context and inject arbitrary SQL syntax.

Attack Vector

The attack is network-based and targets applications that pass user-controllable Python list inputs to the pg8000.native.literal function. An attacker can craft a malicious list containing SQL injection payloads that, when processed by the vulnerable function, result in the execution of arbitrary SQL commands against the PostgreSQL database.

The exploitation scenario involves an attacker providing specially crafted input through an application's interface (such as a web form or API endpoint) that eventually gets processed by the vulnerable function. When the tainted literal is incorporated into a SQL query, the injected payload executes within the database context.

For detailed technical analysis and proof-of-concept information, refer to the vulnerability research documentation on GitHub.

Detection Methods for CVE-2025-61385

Indicators of Compromise

  • Unusual SQL error messages in application logs indicating syntax errors from malformed queries
  • Database audit logs showing unexpected or unauthorized SQL operations
  • Anomalous list-formatted inputs in application request logs targeting endpoints that interact with PostgreSQL
  • Evidence of data exfiltration or unauthorized database modifications

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in HTTP request parameters
  • Enable PostgreSQL query logging and monitor for suspicious query patterns or syntax anomalies
  • Deploy application-level input validation logging to identify attempts to submit malicious list structures
  • Utilize database activity monitoring (DAM) solutions to detect anomalous SQL command execution

Monitoring Recommendations

  • Configure alerts for SQL error spikes that may indicate injection attempts
  • Monitor database connection logs for unusual access patterns from application servers
  • Implement anomaly detection for database query volumes and types
  • Review application logs for requests containing suspicious Python list-like syntax in input fields

How to Mitigate CVE-2025-61385

Immediate Actions Required

  • Upgrade pg8000 to a patched version that addresses CVE-2025-61385
  • Review application code for any usage of pg8000.native.literal with untrusted input
  • Implement additional input validation layers before data reaches the pg8000 driver
  • Consider using parameterized queries exclusively instead of literal conversion functions

Patch Information

The vendor has released a patch addressing this vulnerability. The fix can be reviewed in the Codeberg commit (8663c746b02286c32f19c385f0e2e5da9e4fa140). Organizations using pg8000 should update to the latest version containing this fix immediately. Verify the integrity of the update through the official package repository or Codeberg source.

Workarounds

  • Avoid using pg8000.native.literal function with any user-controlled or untrusted input until patched
  • Implement strict input validation and sanitization before passing data to pg8000 functions
  • Use parameterized queries (pg8000.native.Connection.run() with parameters) instead of building SQL literals manually
  • Deploy network-level controls to limit database access to authorized application servers only
bash
# Upgrade pg8000 to the latest patched version
pip install --upgrade pg8000

# Verify installed version
pip show pg8000 | grep Version

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechPg8000

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • Codeberg Commit Changes

  • GitHub CVE-2025-61385 Research
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox 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