# CVE-2025-12817: PostgreSQL CREATE STATISTICS does not check for schema CREATE privilege

> A table owner can cause denial of service against other users by creating statistics in any schema without proper privilege checks.

- **Severity:** Low 3.1 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Nov 2025
- **Updated:** 13 Nov 2025
- **Also known as:** ALPINE-CVE-2025-12817, AZL-70169, AZL-70396, BELL-CVE-2025-12817, BIT-postgresql-2025-12817, CLEANSTART-2026-RW68010, CLSA-2026-1769516785, DEBIAN-CVE-2025-12817, ECHO-e69d-d943-6623, GHSA-99qj-9hw7-85x8, MINI-6jcf-cq98-c8q5, MINI-74rp-2x93-54hv, MINI-89cp-rrww-4f43, MINI-hf82-3x7f-m637, MINI-rmx2-74jj-wxp7, MINI-x7vx-2cmx-7mj5, UBUNTU-CVE-2025-12817

## What is CVE-2025-12817?

CVE-2025-12817 is a low-severity missing authorization vulnerability in PostgreSQL, published on 13 Nov 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Missing authorization in PostgreSQL CREATE STATISTICS command allows a table owner to achieve denial of service against other CREATE STATISTICS users by creating in any schema.  A later CREATE STATISTICS for the same name, from a user having the CREATE privilege, would then fail.  Versions before PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23 are affected.

Weakness: CWE-862 (Missing Authorization)

## Which versions are affected by CVE-2025-12817?

1 open source package ship an affected version, including postgresql.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `postgresql` | Bitnami | All versions | 13.23.0, 14.20.0, 15.15.0, 16.11.0, 17.7.0, 18.1.0 |

## How do I fix CVE-2025-12817?

Upgrade postgresql to a fixed version for your release line: 13.23.0, 14.20.0, 15.15.0 or 16.11.0.

## Is CVE-2025-12817 being exploited?

There is no known exploitation of CVE-2025-12817 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-12817 and fix it if it is affected.

What it is: CVE-2025-12817 is a low-severity missing authorization vulnerability in PostgreSQL, published on 13 Nov 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-12817 in the wild and no public exploit code.

Affected packages and fixed versions:
- postgresql (Bitnami): affected all versions; fixed in 13.23.0, 14.20.0, 15.15.0, 16.11.0, 17.7.0, 18.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-12817/ (Markdown: https://insights.sbomify.com/CVE-2025-12817/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-12817
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-12817
- OSV: https://osv.dev/vulnerability/CVE-2025-12817

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-12817/
Summaries are generated and may contain mistakes; the official description above is the record.
