# CVE-2026-42812: Apache Polaris: No protection on `write.metadata.path`

> Attackers can bypass storage location validation to write metadata to arbitrary locations, potentially exposing or corrupting data via credential vending.

- **Severity:** Critical 9.4 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **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:** 4 May 2026
- **Updated:** 4 May 2026
- **Also known as:** GHSA-w76p-3cgp-qfcm

## What is CVE-2026-42812?

CVE-2026-42812 is a critical missing authorization vulnerability in Apache Polaris, published on 4 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

In Apache Iceberg, the table's metadata files are control files: they tell readers
which data files belong to the table and which table version to read.

`write.metadata.path` is an optional table property that tells Polaris
where to
write those metadata files. 
For a table already registered in a
Polaris-managed
catalog, changing only that property through an `ALTER TABLE`-style settings
change (not a row-level `INSERT`, `SELECT`, `UPDATE`, or `DELETE`) bypasses
the commit-time branch that is supposed to revalidate storage locations.

The full persisted / credential-vending variant requires the affected
catalog
to have `polaris.config.allow.unstructured.table.location=true`, with
`allowedLocations` broad enough to include the attacker-chosen target.

`allowedLocations` is the admin-configured allowlist of storage paths that
the
catalog is allowed to use. Public project materials suggest that this flag
is a
real supported compatibility / layout mode, not just a contrived lab-only
prerequisite.

In that configuration, a user who can change table settings can cause Apache Polaris
itself to write new table metadata to an attacker-chosen reachable storage
location before the intended location-validation branch runs.

If the later concrete-path validation also accepts that location, Polaris
persists the resulting metadata path into stored table state. Later
table-load
and credential APIs can then return temporary cloud-storage credentials for
the
same location without revalidating it. In plain terms, Polaris can later
hand
out temporary storage access for the same attacker-chosen area.

That attacker-chosen area does not need to be limited to the poisoned
table's
own files. If it is a broader storage prefix, another table's prefix, or,
depending on configuration or provider behavior, even a bucket/container
root,
the resulting disclosure or corruption scope can extend to any data and
metadata Polaris can reach there.

The practical consequences are therefore similar to the staged-create
credential-vending issue already discussed: data and metadata reachable in
that
storage scope can be exposed and, if write-capable credentials are later
issued, modified, corrupted, or removed. Even before that later credential
step, Polaris itself performs the metadata write to the unchecked location.

So the core issue is not only later credential vending. 

The primary defect
is
that Polaris skips its intended location checks before performing a
security-
sensitive metadata write when only `write.metadata.path` changes.

When `polaris.config.allow.unstructured.table.location=false`, current code
review suggests the later `updateTableLike(...)` validation usually rejects
out-of-tree metadata locations before the unsafe path is persisted. That may
reduce the persisted / credential-vending variant, but it does not prevent
the
underlying defect: Polaris still skips the intended pre-write location check
when only `write.metadata.path` changes.

Weakness: CWE-863 (Incorrect Authorization), CWE-732 (Incorrect Permission Assignment for Critical Resource), CWE-284 (Improper Access Control), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2026-42812?

2 open source packages ship an affected version, including org.apache.polaris:polaris-runtime-service. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.polaris:polaris-runtime-service` | Maven | From 0.9.0 | 1.4.1 |
| `org.apache.polaris:polaris-runtime-service` | Maven | From 0.9.0 | 1.4.1 |

Products: Apache Polaris.

## How do I fix CVE-2026-42812?

Upgrade org.apache.polaris:polaris-runtime-service to 1.4.1 or later.

## Is CVE-2026-42812 being exploited?

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

## Other vulnerabilities in Apache Polaris

- [CVE-2026-42809](https://insights.sbomify.com/CVE-2026-42809/): Apache Polaris: staged table creation could vend storage credentials for unvalidated locations (critical 9.4)
- [CVE-2026-42810](https://insights.sbomify.com/CVE-2026-42810/): Apache Polaris: could broaden vended S3 credentials through wildcard-bearing namespace or table names (critical 9.4)
- [CVE-2026-42811](https://insights.sbomify.com/CVE-2026-42811/): Apache Polaris has an Improper Input Validation issue (critical 9.4)
- [CVE-2026-64640](https://insights.sbomify.com/CVE-2026-64640/): Apache Polaris: register endpoint reads attacker-controlled storage location before allowed-locations validation (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42812 and fix it if it is affected.

What it is: CVE-2026-42812 is a critical missing authorization vulnerability in Apache Polaris, published on 4 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-42812 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.polaris:polaris-runtime-service (Maven): affected from 0.9.0; fixed in 1.4.1
- org.apache.polaris:polaris-runtime-service (Maven): affected from 0.9.0; fixed in 1.4.1

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-2026-42812/ (Markdown: https://insights.sbomify.com/CVE-2026-42812/index.md)
```

## Sources

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

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