# CVE-2025-0840: GNU Binutils objdump.c disassemble_bytes stack-based overflow

> A stack-based buffer overflow in GNU Binutils objdump allows remote attackers to execute arbitrary code or cause denial of service via crafted files.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Jan 2025
- **Updated:** 12 Feb 2025
- **Also known as:** ALPINE-CVE-2025-0840, AZL-56099, AZL-56103, BELL-CVE-2025-0840, CLSA-2025-1741628714, CLSA-2025-1741779141, CLSA-2025-1741779457, CLSA-2025-1741779966, CLSA-2025-1741787747, CLSA-2025-1741964468, CLSA-2025-1742232795, CLSA-2025-1742317463, CLSA-2025-1742379365, CLSA-2025-1742391294, CLSA-2025-1747926654, CLSA-2025-1761323691, CLSA-2025-1764688910, DEBIAN-CVE-2025-0840, ECHO-f079-5d5a-ac2d, GHSA-c5qp-mx9f-m5c7, MINI-r6x4-pprp-2x44, OESA-2025-1129, ROOT-OS-DEBIAN-12-CVE-2025-0840, UBUNTU-CVE-2025-0840, openSUSE-SU-2025:15725-1

## What is CVE-2025-0840?

CVE-2025-0840 is a medium-severity memory corruption vulnerability in Gnu Binutils, published on 29 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability, which was classified as problematic, was found in GNU Binutils up to 2.43. This affects the function disassemble_bytes of the file binutils/objdump.c. The manipulation of the argument buf leads to stack-based buffer overflow. It is possible to initiate the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. Upgrading to version 2.44 is able to address this issue. The identifier of the patch is baac6c221e9d69335bf41366a1c7d87d8ab2f893. It is recommended to upgrade the affected component.

Weakness: CWE-121 (Stack-based Buffer Overflow), CWE-787 (Out-of-bounds Write), CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2025-0840?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `binutils` | openSUSE:Tumbleweed | All versions | 2.45-2.1 |

Products: Gnu Binutils.

## How do I fix CVE-2025-0840?

Upgrade to a fixed version.

## Is CVE-2025-0840 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-0840 exists.

## Other vulnerabilities in Gnu Binutils

- [CVE-2017-7614](https://insights.sbomify.com/CVE-2017-7614/): Null dereference in n/a (critical 9.8)
- [CVE-2014-9939](https://insights.sbomify.com/CVE-2014-9939/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-7226](https://insights.sbomify.com/CVE-2017-7226/): Information disclosure in n/a (critical 9.1)
- [CVE-2017-6969](https://insights.sbomify.com/CVE-2017-6969/): Information disclosure in n/a (critical 9.1)
- [CVE-2020-19726](https://insights.sbomify.com/CVE-2020-19726/): Denial of service in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-0840 and fix it if it is affected.

What it is: CVE-2025-0840 is a medium-severity memory corruption vulnerability in Gnu Binutils, published on 29 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-0840 exists.

Affected product: Gnu Binutils. 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-2025-0840/ (Markdown: https://insights.sbomify.com/CVE-2025-0840/index.md)
```

## Sources

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

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