# RUSTSEC-2026-0312: Excluded iPAddress name constraints with an all-zero mask are not applied

> Attackers with compromised sub-CA keys can issue valid certificates for arbitrary IP addresses, bypassing name constraints in the x509-validator library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Sep 2026
- **Also known as:** GHSA-39mm-4q6x-3vrx

## What is RUSTSEC-2026-0312?

RUSTSEC-2026-0312 is a vulnerability in x509-validator, published on 24 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

An `excluded_subtrees` iPAddress name constraint with an all-zero mask
(`0.0.0.0/0` or `::/0`) does not restrict iPAddress SANs in certificates issued
beneath it. The mask check treated an all-zero mask as matching nothing, when a
`/0` prefix matches every address of its family, so the exclusion was silently
ignored.

CA/Browser Forum Baseline Requirements §7.1.2.5.2 require exactly these
exclusions on every technically constrained sub-CA that may not issue for IP
addresses. As a result, anyone holding (or having compromised) the key of such
a sub-CA can issue a certificate for an arbitrary IP address, and `Validator`
with `RFC5280Policy` and `ServerIdentityPolicy` accepts it for that address. A
`permitted_subtrees` dNSName entry on the same issuer does not prevent this,
because iPAddress SANs are a different name form.

All users of `Validator` with `RFC5280Policy` are affected when a chain can
contain a name-constrained issuer with an all-zero iPAddress exclusion.

The issue is fixed in x509-validator 0.3.1 (commit
[da661f8](https://github.com/namecare/x509-validator/commit/da661f8ecee820e05d089a76ecb654ff52a2c987)).
Users should upgrade to 0.3.1 or later.

## Which versions are affected by RUSTSEC-2026-0312?

1 open source package ship an affected version, including x509-validator.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `x509-validator` | crates.io | From 0.0.0-0 | 0.3.1 |

## How do I fix RUSTSEC-2026-0312?

Upgrade x509-validator to 0.3.1 or later.

## Is RUSTSEC-2026-0312 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for RUSTSEC-2026-0312 and fix it if it is affected.

What it is: RUSTSEC-2026-0312 is a vulnerability in x509-validator, published on 24 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of RUSTSEC-2026-0312 in the wild and no public exploit code.

Affected packages and fixed versions:
- x509-validator (crates.io): affected from 0.0.0-0; fixed in 0.3.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/RUSTSEC-2026-0312/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0312/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/RUSTSEC-2026-0312

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