Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2020-14349

CVE-2020-14349: PostgreSQL SQL Injection Vulnerability

CVE-2020-14349 is a SQL injection flaw in PostgreSQL affecting versions before 12.4, 11.9, and 10.14. Attackers can execute arbitrary SQL commands during logical replication. This article covers technical details, impact, and mitigation.

Published: March 4, 2026

CVE-2020-14349 Overview

A SQL injection vulnerability was discovered in PostgreSQL that allows an authenticated attacker to execute arbitrary SQL commands through improper sanitization of the search_path during logical replication. This flaw is similar to CVE-2018-1058 and affects PostgreSQL versions before 12.4, before 11.9, and before 10.14. An attacker with valid credentials can exploit this vulnerability to execute malicious SQL commands in the context of the user used for replication, potentially leading to data exfiltration, modification, or privilege escalation within the database environment.

Critical Impact

Authenticated attackers can execute arbitrary SQL commands in the replication user context, potentially compromising database integrity and confidentiality.

Affected Products

  • PostgreSQL versions before 12.4
  • PostgreSQL versions before 11.9
  • PostgreSQL versions before 10.14
  • openSUSE Leap 15.1
  • openSUSE Leap 15.2

Discovery Timeline

  • 2020-08-24 - CVE-2020-14349 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-14349

Vulnerability Analysis

This vulnerability stems from PostgreSQL's failure to properly sanitize the search_path parameter during logical replication operations. The search_path setting determines the order in which schemas are searched when an object name is referenced without explicit schema qualification. By manipulating this parameter, an attacker can cause PostgreSQL to resolve function or object names to malicious implementations in attacker-controlled schemas instead of the intended system objects.

During logical replication, the database executes various internal operations using the replication user's privileges. When the search_path is not properly sanitized, an attacker can inject a schema containing trojanized versions of commonly-used functions. When the replication process calls these functions without schema qualification, the malicious versions are executed instead, running arbitrary SQL code with the replication user's elevated privileges.

Root Cause

The root cause is classified under CWE-89 (SQL Injection). PostgreSQL's logical replication subsystem did not implement adequate input validation and sanitization for the search_path configuration parameter. This allowed the injection of schema names that could redirect function resolution to attacker-controlled implementations, bypassing the expected execution flow and enabling arbitrary SQL command execution.

Attack Vector

This is a network-based attack that requires authentication to the PostgreSQL database. The attacker must have valid credentials to access the database system. The attack complexity is considered high as it requires specific conditions related to logical replication configuration. Additionally, user interaction may be required in certain exploitation scenarios.

The attack proceeds through the following mechanism:

  1. The attacker establishes an authenticated connection to the PostgreSQL database
  2. The attacker creates a malicious schema containing trojanized functions that mimic system functions
  3. The attacker manipulates the search_path to include their malicious schema with higher priority
  4. During logical replication operations, unqualified function calls resolve to the malicious implementations
  5. The attacker's SQL commands execute with the privileges of the replication user

Detection Methods for CVE-2020-14349

Indicators of Compromise

  • Unexpected schema creation or modification by non-administrative users
  • Unusual search_path configurations in database sessions, especially during replication
  • Presence of user-defined functions with names matching common system functions in non-system schemas
  • Anomalous SQL query patterns during logical replication processes

Detection Strategies

  • Monitor PostgreSQL logs for search_path modifications during replication sessions
  • Implement database activity monitoring (DAM) to detect schema manipulation and suspicious function creation
  • Query system catalogs (pg_namespace, pg_proc) for user-created objects that shadow system functions
  • Review replication user privileges and ensure they follow the principle of least privilege

Monitoring Recommendations

  • Enable and regularly review PostgreSQL audit logging with focus on DDL statements
  • Set up alerts for search_path changes involving non-standard schemas
  • Monitor for new function definitions that match names of PostgreSQL built-in functions
  • Implement real-time monitoring of replication slot activity and associated session parameters

How to Mitigate CVE-2020-14349

Immediate Actions Required

  • Upgrade PostgreSQL to version 12.4, 11.9, or 10.14 or later immediately
  • Audit current search_path configurations across all database users
  • Review and restrict privileges of replication users to minimum necessary
  • Examine existing schemas for potentially malicious function definitions

Patch Information

PostgreSQL has released security patches addressing this vulnerability. Organizations should upgrade to the following minimum versions:

  • PostgreSQL 12.x: Upgrade to version 12.4 or later
  • PostgreSQL 11.x: Upgrade to version 11.9 or later
  • PostgreSQL 10.x: Upgrade to version 10.14 or later

For additional information, refer to the Ubuntu Security Notice, Gentoo GLSA Overview, NetApp Security Advisory, or the Red Hat Bug Report.

Workarounds

  • Explicitly set search_path to include only trusted schemas for replication users: ALTER ROLE replication_user SET search_path = pg_catalog, public;
  • Revoke CREATE privileges on public schema from PUBLIC to prevent unauthorized function creation
  • Use fully schema-qualified function names in all custom code and triggers
  • Implement strict schema permission controls to prevent untrusted users from creating schemas
bash
# Configuration example: Restrict search_path for replication users
psql -U postgres -c "ALTER ROLE replication_user SET search_path = pg_catalog, public;"
psql -U postgres -c "REVOKE CREATE ON SCHEMA public FROM PUBLIC;"
psql -U postgres -c "GRANT USAGE ON SCHEMA public TO replication_user;"

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechPostgresql

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability1.55%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • Red Hat Bug Report

  • Gentoo GLSA Overview

  • NetApp Security Advisory

  • Ubuntu Security Notice
  • Related CVEs
  • CVE-2024-1597: PostgreSQL JDBC Driver SQLi Vulnerability

  • CVE-2025-1094: PostgreSQL libpq SQL Injection Vulnerability

  • CVE-2023-39417: PostgreSQL SQL Injection Vulnerability

  • CVE-2021-23214: PostgreSQL SQLI 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