SQL Injection Vulnerability in PostgreSQL Packages: PostgreSQL 17 and 18

postgresql17 Updated 15 May 2026

Summary

14/05/2026
N/A
Yes i
High
7.2

ALPINE-CVE-2026-6476: SQL injection in PostgreSQL pg_createsubscriber allows an attacker with pg_create_subscription rights to execute arbitrary SQL as a superuser. Affects postgresql17 versions < 17.10-r0. Fixed in 17.10-r0. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PostgreSQL is a powerful, open-source object-relational database system that uses and extends the SQL language. It is known for its robustness, extensibility, and support for advanced data types. However, certain versions of PostgreSQL, specifically versions 17 and 18 before 17.10 and 18.4 respectively, are vulnerable to an SQL injection flaw in the pg_createsubscriber function, which can allow attackers to execute arbitrary SQL commands with superuser privileges.

Vulnerability Detail

The vulnerability arises from an SQL injection in the pg_createsubscriber function of PostgreSQL. An attacker with pg_create_subscription rights can exploit this flaw to execute arbitrary SQL commands as a superuser. This can lead to severe consequences, including unauthorized data access, data manipulation, or even complete control over the database. The vulnerability is triggered when pg_createsubscriber is executed, making it crucial for users to be aware of their subscription rights and the versions they are using.

How To Fix

Minimum fixed version

17.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql17

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

Workaround

As a temporary workaround, users can restrict the pg_create_subscription rights to trusted users only, minimizing the risk of exploitation until the packages are updated.

Conclusion

In summary, the SQL injection vulnerability in PostgreSQL's pg_createsubscriber function poses significant risks to database security. Users are strongly advised to update their PostgreSQL packages to the latest patched versions to safeguard against potential exploitation.

See every vulnerability recorded for postgresql17 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.2, indicating a high severity level.

PostgreSQL versions 17 and 18, specifically minor versions before 17.10 and 18.4, are affected by this vulnerability.

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

The vulnerability can lead to unauthorized access, data manipulation, or complete control over the database, posing significant risks to data integrity and security.

If immediate updates are not possible, restrict pg_create_subscription rights to trusted users as a temporary measure to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for postgresql17.

How To Fix

Minimum fixed version

17.10-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql17

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