# CVE-2026-86320: Flatpak-builder: host code execution via `git am` hook execution in patch source extraction (`use-git-am`)

> Attackers can execute arbitrary code on the host by providing malicious Git hooks in patch sources when use-git-am is enabled.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **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:** 17 Sep 2026
- **Updated:** 28 Oct 2026
- **Also known as:** ALSA-2026:80495, ALSA-2026:80496, ALSA-2026:80973, CLSA-2026-1792771054, DEBIAN-CVE-2026-86320, GHSA-rvpr-5p35-6vf8, MGASA-2026-0519, OESA-2026-4074, OESA-2026-4224, OESA-2026-4225, OESA-2026-4226, RHSA-2026:80495, RHSA-2026:80496, RHSA-2026:80973, RHSA-2026:84832, RHSA-2026:84833, RHSA-2026:84834, RHSA-2026:84842, RLSA-2026:80495, RLSA-2026:80496, RLSA-2026:80973, UBUNTU-CVE-2026-86320, openSUSE-SU-2026:11845-1

## What is CVE-2026-86320?

CVE-2026-86320 is a high-severity code injection vulnerability in Red Hat Enterprise Linux 10, published on 17 Sep 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

A flaw was found in flatpak-builder where Git hooks are not disabled when applying patch sources with use-git-am: true. An attacker who can provide a malicious source containing a Git post-applypatch hook can cause the hook to execute on the host during the build process, resulting in arbitrary code execution with the privileges of the user running flatpak-builder.

Weakness: CWE-94 (Improper Control of Generation of Code)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `flatpak-builder` | AlmaLinux:10 | All versions | 1.4.4-1.el10_2.1 |
| `flatpak-builder` | AlmaLinux:8 | All versions | 1.2.3-2.el8_10 |
| `flatpak-builder` | AlmaLinux:9 | All versions | 1.2.3-1.el9_8.1 |
| `flatpak-builder` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.4.4-1.el10_2.1 |
| `flatpak-builder-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.4.4-1.el10_2.1 |
| `flatpak-builder-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.4.4-1.el10_2.1 |
| `flatpak-builder` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.3-2.el8_10 |
| `flatpak-builder-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.3-2.el8_10 |
| `flatpak-builder-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.3-2.el8_10 |
| `flatpak-builder` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.3-1.el9_8.1 |
| `flatpak-builder-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.3-1.el9_8.1 |
| `flatpak-builder-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.3-1.el9_8.1 |
| `flatpak-builder` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:1.4.4-1.el10_0.1 |
| `flatpak-builder-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:1.4.4-1.el10_0.1 |
| `flatpak-builder-debugsource` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:1.4.4-1.el10_0.1 |
| `flatpak-builder` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:1.2.2-2.el9_2 |
| `flatpak-builder-debuginfo` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:1.2.2-2.el9_2 |
| `flatpak-builder-debugsource` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:1.2.2-2.el9_2 |
| `flatpak-builder` | Red Hat:rhel_e4s:9.4::appstream | All versions | 0:1.2.3-2.el9_4 |
| `flatpak-builder-debuginfo` | Red Hat:rhel_e4s:9.4::appstream | All versions | 0:1.2.3-2.el9_4 |
| `flatpak-builder-debugsource` | Red Hat:rhel_e4s:9.4::appstream | All versions | 0:1.2.3-2.el9_4 |
| `flatpak-builder` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:1.2.3-1.el9_6.1 |
| `flatpak-builder-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:1.2.3-1.el9_6.1 |
| `flatpak-builder-debugsource` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:1.2.3-1.el9_6.1 |
| `flatpak-builder` | Rocky Linux:10 | All versions | 0:1.4.4-1.el10_2.1 |
| `flatpak-builder` | Rocky Linux:8 | All versions | 0:1.2.3-2.el8_10 |
| `flatpak-builder` | Rocky Linux:9 | All versions | 0:1.2.3-1.el9_8.1 |
| `flatpak-builder` | openSUSE:Tumbleweed | All versions | 1.4.12-1.1 |

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

Apply the vendor's patch.

## Is CVE-2026-86320 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-86320 is a high-severity code injection vulnerability in Red Hat Enterprise Linux 10, published on 17 Sep 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-86320 exists.

Affected product: Red Hat Enterprise Linux 10. 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-86320/ (Markdown: https://insights.sbomify.com/CVE-2026-86320/index.md)
```

## Sources

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

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