GHSA-4J5M-WC25-PVH7
Vulnerability from github – Published: 2026-05-21 21:32 – Updated: 2026-05-21 21:32Impact
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.
Patches
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.
Workarounds
For users who cannot upgrade to 1.1.1:
- Only call
Parser::parse_notebookon.onetoc2files from trusted sources. - Alternatively, use
Parser::parse_section/Parser::parse_section_bufferon individual .one files, which do not perform the directory walk.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "onenote_parser"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-46671"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-21T21:32:11Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Impact\nA maliciously crafted `.onetoc2` table-of-contents file can cause `Parser::parse_notebook` to open arbitrary files on the host filesystem outside the notebook\u0027s directory. The parser reads entry names listed inside the `.onetoc2` and joins them against the notebook\u0027s base directory without validating that they are relative paths confined to that directory.\n\nThe parser will bail out when the target file fails to parse as a OneNote section, so direct content exfiltration through the parser\u0027s return value is not practical, though file-existence probing and denial-of-service via large or special files remain possible.\n\nAnyone 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.\n\n### Patches\nFixed 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\u0027s base directory.\n\n### Workarounds\nFor users who cannot upgrade to 1.1.1:\n\n- Only call `Parser::parse_notebook` on `.onetoc2` files from trusted sources.\n- Alternatively, use `Parser::parse_section` / `Parser::parse_section_buffer` on individual .one files, which do not perform the directory walk.",
"id": "GHSA-4j5m-wc25-pvh7",
"modified": "2026-05-21T21:32:11Z",
"published": "2026-05-21T21:32:11Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/msiemens/onenote.rs/security/advisories/GHSA-4j5m-wc25-pvh7"
},
{
"type": "WEB",
"url": "https://github.com/msiemens/onenote.rs/commit/c9267b2c96e2542be7e7b557d67318e81b733585"
},
{
"type": "PACKAGE",
"url": "https://github.com/msiemens/onenote.rs"
},
{
"type": "WEB",
"url": "https://github.com/msiemens/onenote.rs/blob/master/CHANGELOG.md#111---2026-05-15"
},
{
"type": "WEB",
"url": "https://github.com/msiemens/onenote.rs/releases/tag/v1.1.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "Rust OneNote File Parser: Path traversal in `Parser::parse_notebook` allows reading files outside the notebook directory"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.