# CVE-2026-72897: Out-of-Bounds Access After SSL_set_SSL_CTX() During a Handshake

> Remote attackers can cause denial of service via out-of-bounds write in OpenSSL when SSL_set_SSL_CTX is used during handshake.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Sep 2026
- **Updated:** 29 Sep 2026
- **Also known as:** ALPINE-CVE-2026-72897, AZL-105471, AZL-105498, AZL-105588, AZL-105633, AZL-105825, AZL-105873, BELL-CVE-2026-72897, CLEANSTART-2026-BW80061, DEBIAN-CVE-2026-72897, GHSA-x8gv-f6w5-h79g, MINI-2544-p52f-gm6x, UBUNTU-CVE-2026-72897

## What is CVE-2026-72897?

CVE-2026-72897 is a high-severity memory corruption vulnerability in Openssl Openssl, published on 29 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Issue summary: A TLS server that calls SSL_set_SSL_CTX() to switch a
connection to a different SSL_CTX part way through a handshake may access
memory beyond the end of an internal array if the replacement context knows
about more provider signature algorithms than the context the connection was
created from. Applications which never call SSL_set_SSL_CTX() are not
affected.

Impact summary: A remote peer may be able to cause a small out-of-bounds
read, and in some circumstances a fixed-value out-of-bounds write, on the
server heap. This may lead to a Denial of Service.

CWE: CWE-787: Out-of-bounds Write

Description: A TLS connection records how many certificate slots it has
when it is created, taken from the SSL_CTX that created it: the built-in
certificate types plus one slot for each provider TLS-SIGALG entry that
context was aware of. That count sizes an internal array of per-slot
certificate validity flags.

An application may replace a connection's SSL_CTX part way through the
handshake by calling SSL_set_SSL_CTX(), most commonly from a servername
callback in order to serve a different virtual host. Doing so did not
refresh the recorded count. A provider signature algorithm's slot index is
its position in the list of whichever context resolves it, so if the
replacement context is aware of more of them than the original, an
algorithm offered by the peer can resolve to an index beyond the end of the
array. Processing the peer's signature algorithms then reads one four byte
word past the end for each such algorithm and, where the word read is zero,
writes a fixed value over it. A peer offering many of them can corrupt heap
metadata and abort the process.

Only provider signature algorithms which occupy one of the excess slots,
and which the server also has configured, have this effect. Codepoints the
replacement context does not recognise are discarded without being resolved
to a slot, and provider signature algorithms are usable only from TLS 1.3.

The two contexts must therefore be aware of different numbers of provider
signature algorithms, which requires separate library contexts, a provider
loaded between the two being created, or providers which differ in what
they advertise - in 4.0, for example, the default provider advertises SM2
where the FIPS provider does not. A deployment meeting the condition is
also unable to negotiate the affected algorithms with legitimate clients,
since the same stale count hides the corresponding certificates, so the
misconfiguration is likely to be noticed. For that reason, and because the
configuration is not the default, this issue has been assessed as Low
severity.

FIPS impact: no
No FIPS modules are affected by this issue as the affected code is outside
the OpenSSL FIPS module boundary.

Weakness: CWE-787 (Out-of-bounds Write)

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

It affects 1 product.


Products: Openssl Openssl.

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

Apply the vendor's patch.

## Is CVE-2026-72897 being exploited?

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

## Other vulnerabilities in Openssl Openssl

- [CVE-2009-3245](https://insights.sbomify.com/CVE-2009-3245/): Null dereference in n/a (critical 10.0)
- [CVE-2006-3738](https://insights.sbomify.com/CVE-2006-3738/): Memory corruption in n/a (critical 10.0)
- [CVE-2026-63073](https://insights.sbomify.com/CVE-2026-63073/): Untrusted Sender DN Used as Format String in CMP Response Validation (critical 9.8)
- [CVE-2016-6309](https://insights.sbomify.com/CVE-2016-6309/): Use after free in n/a (critical 9.8)
- [CVE-2016-0799](https://insights.sbomify.com/CVE-2016-0799/): Integer overflow in n/a (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-72897 is a high-severity memory corruption vulnerability in Openssl Openssl, published on 29 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-72897 in the wild and no public exploit code.

Affected product: Openssl Openssl. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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