# CVE-2026-45774: compliance-trestle Profile Import has an Arbitrary File Read via trestle:// URI and Relative Path Traversal

> An attacker can read arbitrary files from the server filesystem by crafting a malicious OSCAL profile with path traversal sequences in the import URI.

- **Severity:** Medium 6.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Aug 2026
- **Updated:** 14 Aug 2026
- **Also known as:** GHSA-mj4x-vf5c-5xg8, PYSEC-2026-2426

## What is CVE-2026-45774?

CVE-2026-45774 is a medium-severity path traversal vulnerability in oscal-compass compliance-trestle, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

compliance-trestle is a tooling platform for managing compliance as code. Prior to versions 3.12.2 and 4.0.3, the compliance-trestle library's profile import mechanism resolves `trestle://` URIs and relative file paths by joining them with `trestle_root` and calling `.resolve()`, but performs no boundary check to ensure the resolved path stays within the trestle workspace. An attacker can craft a malicious OSCAL profile YAML with `imports[].href` containing path traversal sequences to read arbitrary files from the server filesystem. Versions 3.12.3 and 4.0.3 patch the issue.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

5 open source packages ship an affected version, including compliance-trestle.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `compliance-trestle` | PyPI | All versions | 3.12.2, 4.0.3 |
| `compliance-trestle` | PyPI | All versions | 3.12.2 |
| `compliance-trestle` | PyPI | All versions | 3.12.2 |
| `compliance-trestle` | PyPI | From 4.0.0 | 4.0.3 |
| `compliance-trestle` | PyPI | From 4.0.0 | 4.0.3 |

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

Upgrade compliance-trestle to a fixed version for your release line: 3.12.2 or 4.0.3.

## Is CVE-2026-45774 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-45774 is a medium-severity path traversal vulnerability in oscal-compass compliance-trestle, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, 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-45774 exists.

Affected packages and fixed versions:
- compliance-trestle (PyPI): affected all versions; fixed in 3.12.2, 4.0.3
- compliance-trestle (PyPI): affected all versions; fixed in 3.12.2
- compliance-trestle (PyPI): affected all versions; fixed in 3.12.2
- compliance-trestle (PyPI): affected from 4.0.0; fixed in 4.0.3
- compliance-trestle (PyPI): affected from 4.0.0; fixed in 4.0.3

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-45774/ (Markdown: https://insights.sbomify.com/CVE-2026-45774/index.md)
```

## Sources

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

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