From Course Notes to CVE: How a GXPN Study Session Uncovered a 40
A custom quicksort in makeindex 2.17 lacks a recursion depth limit and mishandles duplicate entries, so a crafted index file with clustered duplicates in a particular order drives deeply unbalanced partitions and exhausts the stack. An attacker could deliver such a file to crash makeindex and stall automated document build pipelines, though code execution was ruled out.
Published on v1codex.medium.com
On December 26, 2025, a critical vulnerability was discovered in makeindex 2.17, a 40-year-old indexing tool embedded in TeX Live 2025 — the LaTeX typesetting system used by millions of academic institutions, publishing houses, and technical documentation platforms worldwide. The vulnerability (CVSS 5.5 MEDIUM…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the custom quicksort has no recursion depth limit and its two-way partitioning sends all entries equal to the pivot to one side, so clustered duplicates produce maximally unbalanced partitions and unbounded recursion.
Impact
The crash is a reliable denial of service that could stall automated build pipelines and documentation generation, but code execution was ruled out and modern mitigations such as PIE, stack canaries and DEP were present.
What the attacker needed
Crafted .idx file; victim runs makeindex on it; no special privileges needed
The fix
The vendor planned to fix it in a later TeX Live release and suggested replacing the vulnerable sorting algorithm with a modern implementation; the text does not say a fix has shipped.
How it was found
- Convert the spreadsheet of course notes into a LaTeX index file with the conversion script.
- Run makeindex on the generated index file.
- Observe the segmentation fault during the sorting phase.
- Remove the duplicate entries and confirm the file then processes without crashing.
- Add the duplicates back in their original positions and confirm the crash returns.
- Reverse or shuffle the entries and confirm the crash no longer occurs.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
makeindex is an old helper program that sorts the index of a LaTeX document. Its sorting routine is a hand-written version of quicksort, a divide-and-conquer sorting method that calls itself repeatedly; if the data splits very unevenly, those nested calls pile up until the program runs out of stack memory and crashes. The author found this by accident when their own notes file made the program crash every time.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.