CVE-2021-42612
High · 7.8CVSS
7.8
EPSS
0.9%
Published
May 24, 2022
CISA due date
—
Cloudanix analysis
A flaw in a document formatting tool can let a specially made file crash the program or take control of the computer when the file is processed.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free condition in cleanup_index during index processing of crafted documents leads to memory corruption that can result in segmentation faults or broader unspecified memory safety violations.
Why it matters to the business
Processing of untrusted documents on affected systems can trigger crashes or allow arbitrary code execution, disrupting document workflows and potentially compromising workstations or build environments that rely on Halibut.
How an attack unfolds
An attacker supplies a specially crafted text document to Halibut; during index cleanup the freed memory is reused, and with an available public exploit the attacker can trigger the flaw to achieve memory corruption and subsequent code execution or denial of service.
How to fix it
Upgrade Halibut to a version containing the fix for the use-after-free in cleanup_index; rebuild and redeploy any Fedora packages or downstream tooling that embeds the vulnerable Halibut binary; remove or sandbox legacy 1.2 installations until patches are applied.
How to confirm the fix worked
Confirm Halibut version is newer than 1.2 and that index.c no longer contains the vulnerable cleanup_index logic; run regression tests with known triggering documents; monitor for absence of segmentation faults on previously crashing inputs.
Typical attack path
- Obtain or generate a malicious text document targeting the index.c cleanup path
- Invoke Halibut on the crafted document locally or via automated build tooling
- Trigger use-after-free during index cleanup to corrupt memory
- Leverage corruption for control-flow hijacking or crash depending on exploit primitive
How to detect it
Review process execution logs and application crash reports for Halibut invocations on untrusted documents; inspect core dumps or segmentation fault records that originate from index.c cleanup paths; correlate file-processing timestamps with anomalous Halibut terminations.
What your security team should do
- Prioritize patching or replacing all Halibut 1.2 instances given public exploit availability
- Inventory document-processing pipelines and CI systems that invoke Halibut
- Apply vendor updates for Fedora packages once released and verify deployed binaries
- Restrict Halibut execution to trusted input sources until remediation is complete
The record
A use after free in cleanup_index in index.c in Halibut 1.2 allows an attacker to cause a segmentation fault or possibly have other unspecified impact via a crafted text document.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | halibut | 0 | No fix |
| Debian:12 | halibut | 0 | 1.3-1 |
| Debian:13 | halibut | 0 | 1.3-1 |
| Mageia:8 | halibut | 0 | 1.3-1.mga8 |
| Ubuntu:16.04:LTS | halibut | 0 | No fix |
| Ubuntu:18.04:LTS | halibut | 0 | No fix |
| Ubuntu:20.04:LTS | halibut | 0 | No fix |
| Ubuntu:22.04:LTS | halibut | 0 | No fix |
| Ubuntu:24.04:LTS | halibut | 0 | No fix |
| Ubuntu:24.10 | halibut | 0 | No fix |
| Ubuntu:25.04 | halibut | 0 | No fix |
| Ubuntu:25.10 | halibut | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | halibut | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | halibut | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | halibut | 0 | No fix |
Related vulnerabilities
- CVE-2021-42613 A double free in cleanup_index in index.c in Halibut 1.2 allows an attacker to cause a… Also affects halibut
- CVE-2021-42614 A use after free in info_width_internal in bk_info.c in Halibut 1.2 allows an attacker to… Also affects halibut
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort… CWE-416
- CVE-2026-109619 PHP has various global state that temporarily points into request memory. CWE-416
- CVE-2026-112402 Pillow is a Python imaging library. CWE-416
- CVE-2026-112396 Pillow is a Python imaging library. CWE-416
- CVE-2025-55654 A use-after-free in the gf_filter_pid_get_packet function (filter_core/filter_pid.c) of… CWE-416
- CVE-2026-17591 A flaw was found in libarchive. CWE-416