# CVE-2026-46671: Rust OneNote File Parser: Path traversal in `Parser::parse_notebook` allows reading files outside the notebook directory

> A path traversal vulnerability in the Rust OneNote parser allows attackers to read files outside the notebook directory or cause denial of service via crafted files.

- **Severity:** Medium 4.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L`)
- **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:** 20 Jul 2026
- **Updated:** 20 Jul 2026
- **Also known as:** GHSA-4j5m-wc25-pvh7

## What is CVE-2026-46671?

CVE-2026-46671 is a medium-severity path traversal vulnerability in msiemens onenote.rs, published on 20 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

Rust OneNote File Parser is a parser for Microsoft OneNote files implemented in Rust. Prior to version 1.1.1, a maliciously crafted `.onetoc2` table-of-contents file can cause `Parser::parse_notebook` to open arbitrary files on the host filesystem outside the notebook's directory. The parser reads entry names listed inside the `.onetoc2` and joins them against the notebook's base directory without validating that they are relative paths confined to that directory. The parser will bail out when the target file fails to parse as a OneNote section, so direct content exfiltration through the parser's return value is not practical, though file-existence probing and denial-of-service via large or special files remain possible. Anyone using `onenote_parser` to parse .onetoc2 files received from untrusted sources is affected. Users who only ever parse their own notebooks are not at meaningful risk. The issue is fixed in onenote_parser 1.1.1. The fix rejects absolute paths, parent-directory components, and other invalid path characters in entry names, and additionally canonicalises the resolved path to confirm it stays inside the notebook's base directory. For users who cannot upgrade to 1.1.1, only call `Parser::parse_notebook` on `.onetoc2` files from trusted sources. Alternatively, use `Parser::parse_section` / `Parser::parse_section_buffer` on individual .one files, which do not perform the directory walk.

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

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

2 open source packages ship an affected version, including onenote_parser. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `onenote_parser` | crates.io | All versions | 1.1.1 |
| `onenote_parser` | crates.io | All versions | 1.1.1 |

Products: Msiemens Rust Onenote File Parser.

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

Upgrade onenote_parser to 1.1.1 or later.

## Is CVE-2026-46671 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-46671 is a medium-severity path traversal vulnerability in msiemens onenote.rs, published on 20 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-46671 in the wild and no public exploit code.

Affected packages and fixed versions:
- onenote_parser (crates.io): affected all versions; fixed in 1.1.1
- onenote_parser (crates.io): affected all versions; fixed in 1.1.1

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

## Sources

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

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