pgjdbc stores a different number for a BigDecimal outside the binary numeric range

State
Published
Severity
6.5 Medium
Published
Nov 23, 2026
Updated
Nov 23, 2026
Reserved
Nov 22, 2026

Read the record on cve.org

Description

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.

ProductVersions
pgjdbc pgjdbc42.3.0 to before 42.7.15 Affected

Weaknesses

  • CWE-197 Numeric Truncation Error
  • CWE-400 Uncontrolled Resource Consumption

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.