# GHSA-66fw-43h8-f8p3: XMP Toolkit's `XmpFile::close` can trigger undefined behavior

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-07-26T12:00:00.000Z
- Modified: 2025-10-28T06:29:23.310Z
- Also known as: RUSTSEC-2024-0360
- Weaknesses: CWE-754

## Description

Affected versions of the crate failed to catch C++ exceptions raised within the `XmpFile::close` function. If such an exception occurred, it would trigger undefined behavior, typically a process abort.

This is best demonstrated in [issue #230](https://github.com/adobe/xmp-toolkit-rs/issues/230), where a race condition causes the `close` call to fail due to file I/O errors.

This was fixed in [PR #232](https://github.com/adobe/xmp-toolkit-rs/pull/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.

(As written by GitHub Advisory Database.)

## Affected

- xmp_toolkit (crates.io): before 1.9.0; from 0.0.0-0 before 1.9.0

## References

- <https://github.com/adobe/xmp-toolkit-rs/issues/230> (web)
- <https://github.com/adobe/xmp-toolkit-rs/issues/233> (report, web)
- <https://github.com/adobe/xmp-toolkit-rs/pull/232> (web)
- <https://github.com/adobe/xmp-toolkit-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0360.html> (advisory, web)
- <https://crates.io/crates/xmp_toolkit> (package)

## Sources

- GitHub Advisory Database: [GHSA-66fw-43h8-f8p3](https://github.com/advisories/GHSA-66fw-43h8-f8p3), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2024-0360](https://rustsec.org/advisories/RUSTSEC-2024-0360.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-66fw-43h8-f8p3 · Whole record: https://cve.day/GHSA-66fw-43h8-f8p3.json · Rebuilt by cve.day 2026-11-25T22:56:43.207Z
