# CVE-2026-56390: Arbitrary Output Location Change in GNU Bison

> Attackers can overwrite arbitrary files by supplying malicious grammar directives to GNU Bison, potentially compromising system integrity.

- **Severity:** Medium 4.6 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Jul 2026
- **Updated:** 29 Jul 2026
- **Also known as:** AZL-94136, DEBIAN-CVE-2026-56390, ECHO-c721-9c49-ec13, GHSA-3pcj-vqw8-47jm, JLSEC-2026-1346, UBUNTU-CVE-2026-56390

## What is CVE-2026-56390?

CVE-2026-56390 is a medium-severity path traversal vulnerability in GNU Bison, published on 29 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

GNU Bison improperly handles grammar‑defined output paths. Grammar directives such as %output and %header allow specifying file paths, which are accepted without restriction and override caller‑supplied output options. 
When processing attacker-supplied grammar, this behavior allows directing generated files to arbitrary writable locations on the filesystem, potentially overwriting existing files accessible to the Bison process.

Maintainers of this project were notified about this vulnerability, and fixed the issue in commit 8d101c19d4d9aaedf83a448c925513742d4efcf0. However, they did not provide vulnerable version range. Version 3.8.2 was tested and confirmed as vulnerable, other versions were not tested but might also be vulnerable.

Weakness: CWE-73 (External Control of File Name or Path)

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

It affects 1 product.


Products: Gnu Bison.

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

Apply the vendor's patch.

## Is CVE-2026-56390 being exploited?

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

## Other vulnerabilities in GNU Bison

- [CVE-2026-56389](https://insights.sbomify.com/CVE-2026-56389/): Arbitrary Command Execution in GNU Bison (medium 6.8)
- [CVE-2020-24240](https://insights.sbomify.com/CVE-2020-24240/): Use after free in n/a (medium 5.5)
- [CVE-2020-14150](https://insights.sbomify.com/CVE-2020-14150/): Denial of service in n/a (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-56390 is a medium-severity path traversal vulnerability in GNU Bison, published on 29 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-56390 in the wild and no public exploit code.

Affected product: GNU Bison. 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-56390/ (Markdown: https://insights.sbomify.com/CVE-2026-56390/index.md)
```

## Sources

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

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