Summary
A path traversal vulnerability in dekdee adobe-xd-mcp may allow remote users to influence file output locations through the outputFile or outputDir parameters. Under deployments where the endpoint is reachable and filesystem permissions are sufficient, an attacker could access or overwrite files outside the intended directory.
Affected context
The issue occurs in the file-access-from-request endpoint associated with src/parsers/xd-parser.ts. It may affect deployments that expose this functionality remotely and use request-controlled outputFile or outputDir values without reliably constraining them to an approved filesystem location. The practical impact depends on endpoint exposure, process permissions, and the files available to the service.
Exploit preconditions
- Attack surface: A remotely reachable file-access-from-request endpoint
- Required access: Ability to submit or influence request parameters
- Trigger point: Processing of the
outputFileoroutputDirargument - Why exploitation is possible: User-controlled path components may be resolved outside the intended directory when canonicalization and containment checks are insufficient
Why this happens
The underlying bug is an unsafe relationship between request-controlled path values and filesystem operations. If an application concatenates, resolves, or accepts paths without normalizing them and verifying that the final location remains within an approved base directory, traversal sequences or equivalent path representations may escape the intended boundary. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.
Potential impact
- An attacker may read files accessible to the service if the endpoint supports file retrieval
- An attacker could overwrite or create files in unintended locations
- Application configuration or generated assets may be modified
- Sensitive data could be exposed through subsequent application behavior
- File writes could contribute to denial of service or follow-on compromise
General mitigation guidance
Mitigation generally focuses on reducing trust in request-supplied paths and enforcing filesystem boundaries.
Common defensive patterns include:
- Prefer server-selected filenames and directories over client-provided paths
- Canonicalize paths before use and verify that the resolved path remains under an approved base directory
- Use allowlists for permitted file names, extensions, and output locations
- Keep file-access functionality isolated from sensitive application and system directories
- Run the service with the minimum filesystem permissions required
- Apply resource limits and separate temporary storage from persistent application data
How teams detect issues like this
Organizations can look for path traversal risks through:
- Static analysis rules covering path joins, filesystem APIs, and request-derived values
- Code review checks for string concatenation involving file paths
- Tests using normalized, encoded, absolute, and platform-specific path representations
- Runtime logging of rejected paths and attempts to leave approved directories
- Policy enforcement requiring containment checks before filesystem access
Automated code review and application security testing tools may help identify these patterns, but their results should be validated against deployment-specific behavior.

