Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/markitdown/src/markitdown/converters/_exiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ def exiftool_metadata(
if not exiftool_path:
return {}

# Verify exiftool version
try:
version_output = subprocess.run(
[exiftool_path, "-ver"],
capture_output=True,
text=True,
check=True,
).stdout.strip()
version = float(version_output)
if version < 12.24:
raise RuntimeError(
f"ExifTool version {version} is vulnerable to CVE-2021-22204. "
Comment thread
t3tra-dev marked this conversation as resolved.
Outdated
"Please upgrade to version 12.24 or later."
)
except (subprocess.CalledProcessError, ValueError) as e:
raise RuntimeError("Failed to verify ExifTool version.") from e
Comment thread
t3tra-dev marked this conversation as resolved.

# Run exiftool
cur_pos = file_stream.tell()
try:
Expand Down