Critical Security Flaw in libpq Package: PostgreSQL Client Library Vulnerability

libpq Updated 02 Oct 2025

Summary

20/02/2025
N/A
Yes i
Unrated
Not published

ALSA-2025:1737: Important: libpq security update. Affects libpq versions < 13.20-1.el8_10. Fixed in 13.20-1.el8_10. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The libpq package is the PostgreSQL client library that enables client applications to connect to PostgreSQL database servers. It is a crucial component for applications that rely on PostgreSQL for data storage and management. The library provides various functionalities, including connection handling, query execution, and result processing. However, a recent vulnerability has been identified that affects the quoting APIs within this library, potentially exposing applications to security risks.

Vulnerability Detail

The vulnerability arises from the PostgreSQL quoting APIs failing to neutralize quoting syntax in text that does not pass encoding validation. This flaw, identified as CVE-2025-1094, can lead to SQL injection attacks, where an attacker could manipulate queries by injecting malicious SQL code. If exploited, this vulnerability could compromise the integrity of the database and expose sensitive data.

How To Fix

Minimum fixed version

13.20-1.el8_10

This is the first release that contains the fix.

sudo dnf update libpq

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, you can implement input validation and sanitization in your application to mitigate the risk of SQL injection attacks until the package is updated. Ensure that any user input is properly escaped and validated before being used in SQL queries.

Conclusion

The libpq package has a critical vulnerability that could expose applications to SQL injection attacks. It is crucial to update to the patched version to ensure the security of your PostgreSQL connections. Implementing workarounds can help mitigate risks until the update is applied.

See every vulnerability recorded for libpq →

Share this vulnerability

FAQ

CVE-2025-1094 is a security vulnerability in the PostgreSQL quoting APIs that allows for potential SQL injection attacks due to improper handling of quoting syntax.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability could allow attackers to execute arbitrary SQL commands, potentially leading to data breaches or corruption.

Yes, a patch is available. You should update to version 13.20-1.el8_10 of the libpq and libpq-devel packages to mitigate the vulnerability.

If immediate updates are not possible, implement input validation and sanitization in your application to reduce the risk of SQL injection attacks.

Related vulnerabilities

Recent vulnerabilities recorded for libpq.

How To Fix

Minimum fixed version

13.20-1.el8_10

This is the first release that contains the fix.

sudo dnf update libpq

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback