Skip to content

fix: sanitize subprocess call in _exiftool.py#1671

Open
orbisai0security wants to merge 1 commit intomicrosoft:mainfrom
orbisai0security:fix-fix-v-001-exiftool-subprocess-path-validation
Open

fix: sanitize subprocess call in _exiftool.py#1671
orbisai0security wants to merge 1 commit intomicrosoft:mainfrom
orbisai0security:fix-fix-v-001-exiftool-subprocess-path-validation

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in packages/markitdown/src/markitdown/converters/_exiftool.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File packages/markitdown/src/markitdown/converters/_exiftool.py:41
CWE CWE-22

Description: The ExifTool converter passes user-controlled file paths to subprocess.run() without proper validation. While the code uses a list format (not shell=True), the local_path variable comes from user input and could contain malicious filenames. If the file path contains special characters or is manipulated through path traversal, it could lead to unintended file access or command execution through ExifTool's own command parsing.

Changes

  • packages/markitdown/src/markitdown/converters/_exiftool.py

Verification

  • Build not verified
  • Scanner re-scan not performed
  • LLM code review not performed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant