# CVE-2025-5054: Race Condition in Canonical Apport

> A local attacker can exploit a race condition in Canonical Apport to leak sensitive information by leveraging PID reuse and namespaces.

- **Severity:** Medium 4.7 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 May 2025
- **Updated:** 3 Nov 2025
- **Also known as:** GHSA-4c8w-67qj-c8vp, UBUNTU-CVE-2025-5054, USN-7545-1

## What is CVE-2025-5054?

CVE-2025-5054 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 30 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Race condition in Canonical apport up to and including 2.32.0 allows a local attacker to leak sensitive information via PID-reuse by leveraging namespaces.

When handling a crash, the function `_check_global_pid_and_forward`, which detects if the crashing process resided in a container, was being called before `consistency_checks`, which attempts to detect if the crashing process had been replaced. Because of this, if a process crashed and was quickly replaced with a containerized one, apport could be made to forward the core dump to the container, potentially leaking sensitive information. `consistency_checks` is now being called before `_check_global_pid_and_forward`. Additionally, given that the PID-reuse race condition cannot be reliably detected from userspace alone, crashes are only forwarded to containers if the kernel provided a pidfd, or if the crashing process was unprivileged (i.e., if dump mode == 1).

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

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

It affects 2 products.


Products: Canonical Apport, Canonical Ubuntu Linux.

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

Apply the vendor's patch.

## Is CVE-2025-5054 being exploited?

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

Public exploit code:

- Python tool to detect CVE-2025-5054 vulnerability in Ubuntu systems running Apport ≤ 2.32.0. Performs comprehensive security checks and provides mitigation recommendations. (github_poc): https://github.com/daryllundy/cve-2025-5054

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2021-25682](https://insights.sbomify.com/CVE-2021-25682/): apport improperly parses /proc/pid/status (high 8.8)
- [CVE-2021-25683](https://insights.sbomify.com/CVE-2021-25683/): apport improperly parses /proc/pid/stat (high 8.8)
- [CVE-2021-25684](https://insights.sbomify.com/CVE-2021-25684/): apport can be stalled by reading a FIFO (high 8.8)
- [CVE-2021-3899](https://insights.sbomify.com/CVE-2021-3899/): Race condition in Apport (high 7.8)
- [CVE-2022-1242](https://insights.sbomify.com/CVE-2022-1242/): Other in Apport (high 7.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-5054 is a medium-severity vulnerability in Canonical Ubuntu Linux, published on 30 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5054 exists.

Affected product: Canonical Ubuntu Linux. 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-5054/ (Markdown: https://insights.sbomify.com/CVE-2025-5054/index.md)
```

## Sources

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

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