CVE-2015-3166
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe snprintf implementation in PostgreSQL before 9.0.20, 9.1.x before 9.1.16, 9.2.x before 9.2.11, 9.3.x before 9.3.7, and 9.4.x before 9.4.2 does not properly handle system-call errors, which allows attackers to obtain sensitive information or have other unspecified impact via unknown vectors, as demonstrated by an out-of-memory error.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencePostgreSQL's snprintf implementation fails to properly handle system-call errors, allowing attackers to potentially obtain sensitive information or cause unspecified impact via unknown vectors such as out-of-memory conditions.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 9.0.20>= 9.1, < 9.1.16>= 9.2, < 9.2.11>= 9.3, < 9.3.7>= 9.4, < 9.4.2= 7.0= 8.0= 9.0= 12.04= 14.04= 14.10= 15.04CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed PostgreSQL versionRun 'psql --version' or connect to the database and execute 'SELECT version();' to retrieve the server version stringAffected if The version number is less than 9.0.20, or between 9.1.0 and 9.1.15, between 9.2.0 and 9.2.10, between 9.3.0 and 9.3.6, or between 9.4.0 and 9.4.1
-
Check Debian system package versionIf using Debian, run 'dpkg -l | grep postgresql' to list installed PostgreSQL packages and their versionsAffected if The installed postgresql version is 7.0, 8.0, or 9.0 (these Debian-specific versions are listed as affected)
-
Check Ubuntu system package versionIf using Ubuntu, run 'dpkg -l | grep postgresql' to list installed PostgreSQL packages and their versionsAffected if The installed postgresql version corresponds to Ubuntu 12.04, 14.04, 14.10, or 15.04 packages which ship the vulnerable PostgreSQL versions
-
Verify snprintf is in useThe vulnerability is in PostgreSQL's snprintf implementation - confirm the database is actively running and processing queries (the vulnerability triggers during snprintf calls with system call failures such as out-of-memory conditions)Affected if PostgreSQL is running and handling user queries, as the flaw manifests when snprintf encounters error conditions during formatting operations
A system is affected if it runs any PostgreSQL version below 9.0.20, between 9.1.0-9.1.15, 9.2.0-9.2.10, 9.3.0-9.3.6, or 9.4.0-9.4.1, or uses the Debian/Ubuntu distributions specified that ship these vulnerable versions.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped9.0.209.1.169.2.11
Upgrade PostgreSQL to version 9.0.20, 9.1.16, 9.2.11, 9.3.7, 9.4.2 or later to patch the snprintf error-handling vulnerability.
Upgrade to PostgreSQL 9.0.20, 9.1.16, 9.2.11, 9.3.7, or 9.4.2 (or a later stable release such as 9.4.x, 9.5+, 10+, 11+, 12+, 13+, 14+, or 15+ as appropriate for your environment)
- 1. Identify the currently installed PostgreSQL version by running: psql --version or SELECT version();
- 2. Stop the PostgreSQL service to prevent data corruption during upgrade: sudo systemctl stop postgresql (or sudo service postgresql stop)
- 3. Create a full backup of all databases using pg_dumpall: sudo -u postgres pg_dumpall > /path/to/backup.sql
- 4. For Debian/Ubuntu systems, update package lists and upgrade: sudo apt-get update && sudo apt-get install postgresql (or specify postgresql-9.x for version-specific upgrade)
- 5. If using a Red Hat/CentOS system, use: sudo yum update postgresql or sudo dnf update postgresql
- 6. Verify the new version is installed: psql --version
- 7. Start the PostgreSQL service: sudo systemctl start postgresql (or sudo service postgresql start)
- 8. Verify the database cluster is accessible and data is intact
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2015-3166 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2015-3166 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data