Releases: photostructure/exiftool-vendored.js
Release list
Release 37.0.0
-
💔 BREAKING: malformed UTF-8 in ExifTool JSON output is now marked with
Unicode replacement character U+FFFD (�) instead of ASCII question mark
(?). For example, malformed bytesdc 4bpreviously surfaced as?K
and now surface as�K. This applies to bothread()andreadRaw(),
including scalar and list values and calls that overridereadArgs. Valid
Unicode and authored question marks are unchanged.-
The original malformed string bytes are available without rereading the
media through an optional sparseinvalidUtf8Bytessidecar. It mirrors tag
paths, uses numeric object keys for damaged list items, stores each leaf as
aUint8Array, and is absent when no malformed strings were found:const tags = await exiftool.read(file); tags.City; // "�K" tags.invalidUtf8Bytes?.City; // Uint8Array([0xdc, 0x4b])
exiftool-vendoreddoes not guess a legacy charset. Consumers may decode
only these captured bytes using camera, tag, locale, or user-specific
evidence while retaining the U+FFFD value as a deterministic fallback. -
Nested structures mirror the paths ExifTool returns for the selected
structmode. XML element text, attribute values, CDATA, opaque XML string
values, and leaves parsed from embedded binary XML packets are supported.
The captured bytes are the extracted value after XML parsing, not the
original XML token. Malformed XML element and attribute names are outside
this mechanism: value filters never receive names, and ExifTool's JSON
output repairs or canonicalizes them before the library sees them. -
The change affects new metadata reads only. Upgrading does not rewrite
values that applications have already persisted. Applications that use
extracted metadata as identifiers, facets, or tags may want to rescan or
reindex existing files. -
Consumers may replace ambiguous
?corruption heuristics with explicit
U+FFFD checks where their data flow preserves the marker. Whether to
reject, display, or retain a marked value remains application policy. -
To restore the previous rendering, replace the marker in the string values
you consume (it never appears in numbers, dates, or binary fields). This is
a one-way transform — the reverse is impossible once malformed bytes have
collapsed to?, which is why the marker is preserved by default:typeof value === "string" ? value.replace(/\uFFFD/g, "?") : value;
-
Advanced callers that provide their own non-empty ExifTool
-api Filter=...throughreadArgsretain ownership of the complete
filtering pipeline. A custom filter must perform its own UTF-8 repair and
byte capture if those behaviors are desired;invalidUtf8Byteswill be
absent.
-
-
📦 Corrected resource-cleanup documentation to distinguish normal shutdown, non-blocking
using, awaitedawait using, and best-effort disposal timeouts.
Commits
Full Changelog: 36.1.0...37.0.0
Release 36.1.0
- ✨ Added
ExifTool.editTags()for validated exact list-value additions/removals, MWG Collection additions/predicate removals, and audited scalar or flattened person-name removals without replacing unrelated metadata. See the usage examples.
Commits
Full Changelog: 36.0.0...36.1.0
Release 36.0.0
- 🏚️ Dropped Node.js 20 from the supported engines and CI matrix. Node.js 20 ("Iron") has reached end-of-life, so the minimum supported runtime is now Node.js 22 (
engines.nodeis>=22). The CI test matrix is now Node.js 22, 24, and 26.
Commits
- chore: update changelog for v36.0.0 and v35.21.0 releases (2028aa6)
- chore(deps): update batch-cluster to version 18.0.0 (119cc98)
- chore(deps): update batch-cluster to version 18.0.0 (4ac43be)
- chore: update npm-run-all2 to version 9.0.1 and tmp to version 0.2.7 (02e961c)
- chore/breaking: update Node.js version to 22 in GHA workflows and minimum supported engine in package.json (ec0c4cb)
Release 35.21.0
Release 35.20.0
- docs(CHANGELOG): add entry for Node.js 26 in CI test matrix (44cd3d9)
- chore: add Node.js version 26 to the build matrix (22ea7d1)
- docs(CHANGELOG): update to version 35.20.0 with ExifTool 13.58 and restore support for
^modifier in tag names (37d27e2) - chore: update dependencies to latest versions (7ced8d9)
- chore: update actions/setup-node to v6.4.0 in workflows (3b6b67b)
- fix: allow
^write-even-if-empty modifier in tag names (05e6920) - docs(CHANGELOG): update version to v35.19.0 instead of 35.18.1 (9d95f01)
Release 35.19.0
- 🔥 Security: argument injection hardening GHSA-cw26-7653-2rp5. ExifTool runs in
-stay_open True -@ -mode, where arguments are read from stdin one per line. Several caller-supplied strings were previously interpolated into ExifTool arguments without rejecting line delimiters, so a\ninside a tag name or filename could split one argument into many. Two layers of defense have been added:- Per-site validation. A new
validateTagNamehelper rejects tag-name strings that fall outside the ExifTool tag grammar (letters, digits,:,-,_, and the modifiers*,?,+,#). Applied to write tag keys,deleteAllTags({retain}),read({numericTags}), and the binary-extraction tag names.imageHashTypeis now also validated against anImageHashTypesallowlist at runtime. - Defense-in-depth at the command renderer.
ExifToolTask.renderCommandnow rejects any argument containing\r,\n, or\0before transmission. This covers filename/path arguments, includingreadRaw()andrewriteAllTags(), rawreadArgs/writeArgs, option values, and future newline-delimited interpolation sites. - Tag values passed to
write()were already whitespace-encoded and were not vulnerable. - Reported by Hank Tam through coordinated disclosure.
- Per-site validation. A new
- ✨ Added
ImageHashTypesruntime enum andImageHashTypetype export, for callers that need runtime-checked construction of theimageHashTypeoption.
Commits
- docs(CHANGELOG): update for v35.18.1 - enhance security with argument injection hardening and add ImageHashTypes enum (63dc9b8)
- chore: add .codex to .gitignore (a977b67)
- chore: add "retriable" to cSpell words list (3b132a8)
- test(ExifTool): cover filename argument injection guards (6b7d249)
- docs(ExifTool): document argument validation boundaries (4015fca)
- fix: harden ExifTool argument construction against injection (5d5b155)
- fix: add ImageHashTypes enum and update imageHashType validation (8f999f6)
- test: add check for inherited Object property names in StrEnum (26f7c30)
- chore: update dependencies for globals, prettier, typedoc, and typescript (c77662e)
- chore: update upload-pages-artifact action to version 5.0.0 (ab63cc4)
- chore(fmt) (21e5ab5)
Release 35.18.0
- 🌱 Upgraded ExifTool to version 13.57.
- 🐞 Fixes an ExifTool 13.56 regression (shipped in v35.17.0) where XMP list-valued tags (
dc:subject,HierarchicalSubject,Keywords) read from sidecar files were collapsed to just the last<rdf:li>as a scalar string when-api struct=1was in effect. Users on v35.17.0 who read XMP sidecars should upgrade.