<Vulnerability name="CVE-2026-16237">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-11-12T14:15:30</PublicDate>
    <Bugzilla id="2572574" url="https://bugzilla.redhat.com/show_bug.cgi?id=2572574" xml:lang="en:us">
postgresql: postgresql: Security restriction bypass via INSERT ON CONFLICT on auto-updatable views
    </Bugzilla>
    <CVSS3 status="verified">
        <CVSS3BaseScore>5.4</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-639</CWE>
    <Details xml:lang="en:us" source="Mitre">
Improper protection in PostgreSQL INSERT ... ON CONFLICT on auto-updatable views allows an attacker having INSERT and UPDATE privileges on the view to read and modify every row in the view's base table, via iterated INSERT ... ON CONFLICT DO UPDATE.  This bypasses the view's WHERE condition, whether or not the view is a security_barrier view.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in PostgreSQL. When handling conflict-resolving insert statements (INSERT ... ON CONFLICT) on auto-updatable views, the database fails to properly enforce view boundary restrictions. An authenticated attacker with insert and update privileges on a view can exploit this vulnerability through repeated queries to bypass filtering conditions, allowing them to read and modify unauthorized rows in the underlying base table.
    </Details>
    <Statement xml:lang="en:us">
This vulnerability is rated as Moderate severity rather than Important because exploitation requires an authenticated attacker who already possesses both insert and modification permissions on a targeted view, limiting the blast radius to environments where auto-updatable views are relied upon as security boundaries. In typical Red Hat Enterprise Linux deployments, PostgreSQL views are not automatically configured with partitioned row-level boundaries, and administrative access is needed to grant the necessary write rights. While security_barrier views are bypassed by this defect when conflict handling queries are repeatedly executed, attackers cannot gain broader system access or affect schemas outside their granted database privileges.
    </Statement>
    <Mitigation xml:lang="en:us">
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
    </Mitigation>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-11-13T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:100114">RHSA-2026:100114</Advisory>
        <Package name="postgresql17-main">postgresql17-main-17.12-0.1.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-11-13T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:100123">RHSA-2026:100123</Advisory>
        <Package name="postgresql18-main">postgresql18-main-18.7-0.1.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-11-12T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:99821">RHSA-2026:99821</Advisory>
        <Package name="libpq-main">libpq-main-18.7-0.1.hum1</Package>
    </AffectedRelease>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-16237
https://nvd.nist.gov/vuln/detail/CVE-2026-16237
https://www.postgresql.org/support/security/CVE-2026-16237/
    </References>
</Vulnerability>