# CVE-2026-19542: Stack-based out-of-bounds write in tdelete during tree rebalancing

> A stack-based out-of-bounds write in glibc's tdelete function can crash applications when processing extremely deep binary trees.

- **Severity:** Medium 5.6 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Sep 2026
- **Updated:** 14 Sep 2026
- **Also known as:** AZL-100968, BELL-CVE-2026-19542, DEBIAN-CVE-2026-19542, ECHO-4020-d607-ea47, GHSA-hhcv-vc8h-vmrg, RHSA-2026:59721, UBUNTU-CVE-2026-19542

## What is CVE-2026-19542?

CVE-2026-19542 is a medium-severity memory corruption vulnerability in The GNU C Library glibc, published on 14 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Calling tdelete on a sufficiently deep tree in the GNU C Library version 2.1 to 2.44 may write one pointer past the end of an alloca-allocated array on the stack, which may crash the application.

The tdelete implementation keeps an explicit stack of parent nodes for rebalancing, which is grown as needed while descending the tree.  Two rebalancing branches push an additional entry without checking the capacity, and write past the array when the stack is exactly full. Triggering this requires a node at a depth of exactly 40 (or 40 plus a multiple of 20), which implies a tree with at least a million nodes, so an attacker must drive a large number of insertions and deletions through an application that uses tsearch and tdelete.  The written value is a pointer into a tree node and is not directly attacker controlled.  No affected application in common distributions has been identified.

Weakness: CWE-121 (Stack-based Buffer Overflow)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `compat-libpthread-nonshared` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-all-langpacks` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-benchtests` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-common` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-devel` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-doc` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-gconv-extra` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-aa` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-af` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-agr` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ak` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-am` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-an` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-anp` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ar` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-as` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ast` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ayc` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-az` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-be` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bem` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ber` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bg` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bhb` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bho` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bi` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bn` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bo` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-br` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-brx` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-bs` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-byn` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ca` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ce` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-chr` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-ckb` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-cmn` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-crh` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |
| `glibc-langpack-cs` | Red Hat:hummingbird:1 | All versions | 0:2.43-8.2.hum1 |

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

Apply the vendor's patch.

## Is CVE-2026-19542 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-19542 is a medium-severity memory corruption vulnerability in The GNU C Library glibc, published on 14 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-19542 in the wild and no public exploit code.

Affected product: The GNU C Library glibc. 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-19542/ (Markdown: https://insights.sbomify.com/CVE-2026-19542/index.md)
```

## Sources

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

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