GHSA-66fw-43h8-f8p3: XMP Toolkit's `XmpFile :close` Can Trigger Undefined Behavior Vulnerability

LOW
CWE-754
Published
Advisory Summary

GHSA-66fw-43h8-f8p3 is a LOW :close` can trigger undefined behavior vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting XMP Toolkit's `XmpFile libraries in the crates.io ecosystem. The issue involves :close` can trigger undefined behavior. Remediation is available by upgrading affected packages to version 1.9.0.

GHSA-66fw-43h8-f8p3 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-66fw-43h8-f8p3
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-754: Improper Check for Unusual or Exceptional Conditions
Affected Product XMP Toolkit's `XmpFile
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-66fw-43h8-f8p3

To remediate this vulnerability, upgrade all affected XMP Toolkit's `XmpFile dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

xmp_toolkit fixed: 1.9.0
Upgrade xmp_toolkit to 1.9.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for xmp_toolkit

How to Check if You Are Affected

To determine whether your application is affected by GHSA-66fw-43h8-f8p3, inspect your project dependencies for XMP Toolkit's `XmpFile:

inspect dependencies for xmp_toolkit

Analyze the terminal output to locate any version of XMP Toolkit's `XmpFile in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In XMP Toolkit's `XmpFile, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-66fw-43h8-f8p3 Affected XMP Toolkit's `XmpFile Versions

1 component(s)
Fixed Versions:
1.9.0
Product / Package Ecosystem Affected Versions Fixed Version
xmp_toolkit
crates.io
< 1.9.0
1.9.0

References

Frequently Asked Questions

What is GHSA-66fw-43h8-f8p3?
GHSA-66fw-43h8-f8p3 is a security vulnerability in XMP Toolkit's `XmpFile involving :close` can trigger undefined behavior under CWE-754: Improper Check for Unusual or Exceptional Conditions.
Which XMP Toolkit's `XmpFile versions are affected?
Affected versions include releases prior to 1.9.0 across affected packages: xmp_toolkit.
What version fixes GHSA-66fw-43h8-f8p3?
Upgrading to 1.9.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xmp_toolkit affected?
Yes, xmp_toolkit is affected in releases prior to 1.9.0. Upgrade your dependency to 1.9.0 or later.
What CWE is associated with GHSA-66fw-43h8-f8p3?
GHSA-66fw-43h8-f8p3 is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions (The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.).
How can I check crates.io dependencies for GHSA-66fw-43h8-f8p3?
Run the dependency tree command: 'inspect dependencies for xmp_toolkit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-66fw-43h8-f8p3",
  "modified" : "2025-05-15T21:23:42Z",
  "published" : "2024-07-26T21:14:54Z",
  "aliases" : [ ],
  "summary" : "XMP Toolkit's `XmpFile::close` can trigger undefined behavior",
  "details" : "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.\n\nThis 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.\n\nThis 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.\n\nFor 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.\n\nUsers of all prior versions of `xmp_toolkit` are encouraged to update to version 1.9.0 to avoid undefined behavior.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "xmp_toolkit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/adobe/xmp-toolkit-rs/issues/230"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adobe/xmp-toolkit-rs/issues/233"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adobe/xmp-toolkit-rs/pull/232"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/adobe/xmp-toolkit-rs"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0360.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-754" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-26T21:14:54Z",
    "nvd_published_at" : null
  }
}