# CVE-2026-6637: PostgreSQL refint stack buffer overflow and SQL injection

Source: https://junglewise.ai/threats/cve-2026-6637-postgresql-refint-stack-buffer-overflow-and-sql-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-14. Updated: 2026-05-18  
License: CC BY 4.0 with a link back

CVE-2026-6637 · Severity: high · CVSS 8.8 · Published 2026-05-14

A vulnerability in the PostgreSQL 'refint' module allows a database user to execute unauthorized commands on the underlying server. This could lead to a complete takeover of the database server or the theft of sensitive data. Additionally, certain configurations could allow an attacker to perform unauthorized database operations through SQL injection.

Technologies: [PostgreSQL](https://junglewise.ai/threats/technologies/postgresql). Vendors: [PostgreSQL](https://junglewise.ai/threats/vendors/postgresql).

## Quick answers

**Is CVE-2026-6637 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-6637 being exploited in the wild.

**How severe is CVE-2026-6637?** High severity, with a CVSS score of 8.8, published 14 May 2026.

**Which products and versions are affected?** PostgreSQL Before 18.4, 17.10, 16.14, 15.18, and 14.23.

**Is there a fix for CVE-2026-6637?** A patch was published on 2026-05-12: Fixes released in multiple branches. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-6637 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-6637?** Check whether you run PostgreSQL at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The PostgreSQL 'refint' module contains a stack-based buffer overflow (CWE-121) and is susceptible to SQL injection (CWE-89). An unprivileged database user can exploit the buffer overflow to execute arbitrary code with the privileges of the operating system user running the PostgreSQL service. Furthermore, if an application uses a user-controlled column as a 'refint' cascade primary key, an attacker can use SQL injection to execute arbitrary SQL commands with the privileges of the user performing the update. These issues are resolved in PostgreSQL versions 18.4, 17.10, 16.14, 15.18, and 14.23.

## Affected products

- PostgreSQL PostgreSQL Before 18.4, 17.10, 16.14, 15.18, and 14.23

## Timeline

- 2026-05-12: patched: Fixes released in multiple branches.
- 2026-05-14: disclosed: Public advisory published.

## References

- [https://www.postgresql.org/support/security/CVE-2026-6637/](https://www.postgresql.org/support/security/CVE-2026-6637/)

## Related threats

- [PostgreSQL CREATE EXTENSION arbitrary SQL execution](https://junglewise.ai/threats/cve-2026-6467-uncontrolled-search-path-element-in-postgresql-create-extension)
- [PostgreSQL type confusion in ALTER allows arbitrary code execution](https://junglewise.ai/threats/cve-2026-6460-type-confusion-in-postgresql-allows-an-object-creator-to-execute)
- [PostgreSQL type confusion in SQL-language functions arbitrary code execution](https://junglewise.ai/threats/cve-2026-18447-type-confusion-in-postgresql-sql-language-functions-allows-an)
- [PostgreSQL INSERT ON CONFLICT authorization bypass on auto-updatable views](https://junglewise.ai/threats/cve-2026-16237-improper-protection-in-postgresql-insert-on-conflict-on-auto)
- [PostgreSQL dblink and subscriptions arbitrary file append](https://junglewise.ai/threats/cve-2026-14661-external-control-of-file-name-in-postgresql-dblink-and-create)
