# CVE-2024-8158: User impersonation for lib9p based 9p fileservers

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N/AU:N/V:C/RE:L/U:Red`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: Low; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: High; Integrity impact on other systems: High; Availability impact on other systems: None; AU: N; V: C; RE: L; U: Red
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.60% (percentile 43, 2026-11-26)
- **CWE:** CWE-639
- **Published:** 2024-08-25T21:31:08.246Z
- **Modified:** 2026-06-17T08:22:01.090Z

## Who should check

- Anyone running 9front \< 9645ae07eb66a59015e3e118d0024790c37400da

## Description

A bug in the 9p authentication implementation within lib9p allows an attacker with an existing valid user within the configured auth server to impersonate any other valid filesystem user.

This is due to lib9p not properly verifying that the uname given in the Tauth and Tattach 9p messages matches the client UID returned from the factotum authentication handshake.


The only filesystem making use of these functions within the base 9front systems is the experimental hjfs disk filesystem, other disk filesystems (cwfs and gefs) are not affected by this bug.

This bug was inherited from Plan 9 and is present in all versions of 9front and is remedied fully in commit 9645ae07eb66a59015e3e118d0024790c37400da.

## Affected and fixed versions

- 9front: \< 9645ae07eb66a59015e3e118d0024790c37400da (cvelist)

## Mitigation

- Upgrade 9front to 9645ae07eb66a59015e3e118d0024790c37400da or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-8158. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-8158.md
Affected: 9front < 9645ae07eb66a59015e3e118d0024790c37400da
Fixed in: 9front 9645ae07eb66a59015e3e118d0024790c37400da

Steps:
1. Search this machine and project for 9front: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-8158 being exploited?

There is no confirmed exploitation: CVE-2024-8158 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.60% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-8158?

High: CVSS 8.8 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2024-8158?

9front \< 9645ae07eb66a59015e3e118d0024790c37400da.

### Is there a fix for CVE-2024-8158?

Yes. Fixed in 9front 9645ae07eb66a59015e3e118d0024790c37400da. Upgrade 9front to 9645ae07eb66a59015e3e118d0024790c37400da or later.

### How do I check if I'm affected by CVE-2024-8158?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.9front.org/plan9front/plan9front/07aa9bfeef55ca987d411115adcfbbd4390ecf34/commit.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-8158>

HTML: <https://flawdb.com/CVE-2024-8158> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-8158>
