CVE-2026-49836
Path traversal, arbitrary file write/read via smart object names.
- CVSS 4.6
- 22
- Input Validation and Sanitization
- Remote
psd-tools is a Python package for working with Adobe Photoshop PSD files. Prior to version 1.17.1, `SmartObject.save()` writes an embedded smart object to a path taken verbatim from the PSD file. Because that name is attacker-controlled and unsanitised, a tool that extracts embedded objects from an untrusted `.psd` can be made to write attacker-chosen bytes to an attacker-chosen path (absolute or `../`-traversing), outside its intended output directory. A secondary issue in `SmartObject.open()` for external-kind smart objects allows the attacker-controlled `fullPath` descriptor to be used as an arbitrary file read path, enabling exfiltration of the read content to the controlled write destination. Both issues are fixed in v1.17.1.
- CWE
- 22
- CVSS base score
- 4.6
- Published
- 2026-09-10
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Interface
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- psd-tools
- Fixed by upgrading
- Yes
Solution
Upgrade psd-tools to version 1.17.1 or later.
Vulnerable code sample
import os
from psd_tools import PSDImage
def extract_smart_objects(psd_path: str, out_dir: str) -> None:
"""Extract embedded smart objects from a PSD file."""
psd = PSDImage.open(psd_path)
for layer in psd:
if hasattr(layer, 'smart_object') and layer.smart_object:
obj = layer.smart_object
# VULNERABLE: writes to attacker‑controlled path from PSD metadata
obj.save(os.path.join(out_dir, obj.name))Patched code sample
import os
from psd_tools import PSDImage
def extract_smart_objects(psd_path: str, out_dir: str) -> None:
"""Extract embedded smart objects from a PSD file."""
psd = PSDImage.open(psd_path)
for layer in psd:
if hasattr(layer, 'smart_object') and layer.smart_object:
obj = layer.smart_object
# FIX: sanitize filename to prevent path traversal
safe_name = os.path.basename(obj.name)
obj.save(os.path.join(out_dir, safe_name))Payload
__VAITP_MODEL_REFUSED__
Cite this entry
@misc{vaitp:cve202649836,
title = {{Path traversal, arbitrary file write/read via smart object names.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-49836},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-49836/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
