Rust advisories / xmp_toolkit
Unsound LowRUSTSEC-2024-0360 · xmp_toolkit
RUSTSEC-2024-0360: `XmpFile::close` can trigger UB
Short answerxmp_toolkit has an API that can cause undefined behaviour from safe code: `XmpFile::close` can trigger UB. Fixed in 1.9.0.
| Crate | xmp_toolkit |
|---|---|
| Type | Unsound |
| Affected versions | Before 1.9.0. |
| Fixed in | 1.9.0 |
| Severity | Low (GitHub rating) |
| Published | 2024-07-26 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-66fw-43h8-f8p3 |
| Affected functions | xmp_toolkit::XmpFile::close |
What to do
- See which version you have:
cargo tree -i xmp_toolkit(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p xmp_toolkit. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplexmp_toolkit = "1.9.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of the crate failed to catch C++ exceptions raised within the XmpFile::close function. If such an exception occured, it would trigger undefined behavior, typically a process abort.
This is best demonstrated in issue #230, where a race condition causes the close call to fail due to file I/O errors.
This was fixed in PR #232 (released as crate version 1.9.0), which now safely handles the exception.
For backward compatibility, the existing API ignores the error. A new API XmpFile::try_close was added to allow callers to receive and process the error result.
Users of all prior versions of xmp_toolkit are encouraged to update to version 1.9.0 to avoid undefined behavior.
References
- Package: crates.io/crates/xmp_toolkit
- Advisory: rustsec.org/advisories/RUSTSEC-2024-0360.html
- Report: github.com/adobe/xmp-toolkit-rs/issues/233
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?