CVE-2026-134847: pgjdbc stores a different number for a BigDecimal outside the binary numeric range
pgjdbc, the PostgreSQL JDBC Driver, cuts the weight and scale of a BigDecimal to 16 bits when it sends the value in binary, which is the default. The server then stores a different number without an error. For example 999999.99e-262144 is stored as 999999.99, so a tiny value can pass a range check and be stored as a large one. The driver also computes 10 to the power of the scale first, so a short value such as 1e-200000000 keeps a thread busy for minutes. Versions 42.3.0 through 42.7.14 are affected, and 42.7.15 fixes the problem.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pgjdbcto a version that resolves this vulnerability.Fixed in 42.7.15
Event History
Frequently Asked Questions
Which pgjdbc versions need to be remediated?
Versions 42.3.0 through 42.7.14 are affected. Version 42.7.15 fixes the issue.
Is the default driver behavior affected?
Yes. The problematic conversion occurs when values are sent in binary format, which is the default behavior.
What conditions make an application exploitable?
An application must accept or construct BigDecimal values that are sent through the affected driver. Extremely large positive or negative scales can cause incorrect stored values, and short values with very large scales can keep a driver thread busy for minutes.
What should teams do if they suspect exposure?
Identify applications using pgjdbc versions 42.3.0 through 42.7.14 and upgrade to 42.7.15. Review validation and stored numeric data where inputs with unusual exponents or scales may have been accepted, since a value can pass a range check but be stored as a different, much larger value.