CVE-2015-0242
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 · uneditedStack-based buffer overflow in the *printf function implementations in PostgreSQL before 9.0.19, 9.1.x before 9.1.15, 9.2.x before 9.2.10, 9.3.x before 9.3.6, and 9.4.x before 9.4.1, when running on a Windows system, allows remote authenticated users to cause a denial of service (crash) and possibly execute arbitrary code via a floating point number with a large precision, as demonstrated by using the to_char function.
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 confidenceStack-based buffer overflow in PostgreSQL's printf function implementations on Windows. When processing floating-point numbers with very large precision values (e.g., via the to_char function), the code fails to properly bounds-check buffer allocations, allowing overflow into adjacent stack memory. This enables remote authenticated users to crash the database or potentially execute arbitrary code.
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.19>= 9.1.0, < 9.1.15>= 9.2.0, < 9.2.10>= 9.3.0, < 9.3.6>= 9.4.0, < 9.4.1= 7.0= 8.0CVSS 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
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/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 the operating systemDetermine if the PostgreSQL server is running on Windows. This vulnerability only affects Windows installations.Affected if PostgreSQL is running on a Windows platform
-
Check PostgreSQL version on WindowsRun 'psql --version' or query 'SELECT version();' to obtain the exact PostgreSQL version number installed.Affected if The installed version is < 9.0.19, OR >= 9.1.0 and < 9.1.15, OR >= 9.2.0 and < 9.2.10, OR >= 9.3.0 and < 9.3.6, OR >= 9.4.0 and < 9.4.1
-
Identify to_char function usage with floating-point precisionReview application code and queries that use the to_char function, particularly with numeric/decimal types and a second argument specifying format. Look for large precision values (typically very high digit counts in the format string).Affected if The to_char function is used with floating-point numbers and very large precision values (e.g., to_char(123.456::numeric, '9999999999999999999D9999999999999999999') or similar)
-
Check for database crash logsExamine PostgreSQL error logs on Windows (typically in the 'pg_log' directory under the data folder) for access violation or stack overflow errors related to printf or to_char processing.Affected if Recent crash logs show stack overflow or buffer overflow errors in printf-related code during to_char operations
A user is affected if PostgreSQL is running on Windows, the installed version falls within the vulnerable ranges, and the to_char function is used with floating-point numbers and very large precision values.
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.
From vendor data9.0.199.1.159.2.10
Upgrade PostgreSQL to version 9.0.19, 9.1.15, 9.2.10, 9.3.6, or 9.4.1 or later. Until upgraded, restrict database access to trusted authenticated users only.
- Consultation2.0 h
- Implementation4.0 h
- Testing3.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 $3,088.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2015-0242 — 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-0242 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