Summary
A Local File Read vulnerability in OpenProject's work package PDF export allows attackers to exfiltrate arbitrary files from the server via a crafted image attachment processed by ImageMagick.
When a specially crafted SVG (masquerading as a PNG) is uploaded and later rendered during PDF export, the backend image pipeline can be abused to read any file accessible to the OpenProject application user.
Affected context
This vulnerability occurs in OpenProject deployments that use the work package PDF export feature and rely on ImageMagick for image processing.
It becomes relevant when users are allowed to upload image attachments (e.g., PNG) to work packages or similar containers that can be exported as PDFs.
The issue manifests during backend-side image resizing and rendering, where SVG content disguised as a raster image is interpreted by ImageMagick's text: coder, giving it access to local filesystem content that the OpenProject process can read.
Exploit preconditions
- Attack surface: Web interface for uploading attachments to work packages (or other PDF-exportable entities).
- Required access: Valid OpenProject account with permission to upload attachments to a container that supports PDF export.
- Trigger point: Exporting the affected work package (or container) to PDF, which causes the backend to resize and process the malicious image.
- Why exploitation is possible: The image processing pipeline trusts the file by extension/metadata and passes attacker-controlled SVG content to ImageMagick, which can reference local files via its text: coder, leading to unintended disclosure of filesystem contents.
Why this happens
The underlying bug is an information disclosure issue linked to unsafe use of a powerful image processing engine for untrusted content.
OpenProject's PDF export pipeline accepts user-uploaded images, but relies on ImageMagick to interpret image data without sufficiently constraining supported formats or limiting which coders and features are allowed.
By uploading an SVG disguised as a PNG, an attacker causes ImageMagick to process attacker-controlled markup that can embed references to local files.
This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where internal system files and configuration data are made accessible through a secondary processing component that was not designed with strict isolation from untrusted input.
Potential impact
- Disclosure of operating system files (e.g.,
/etc/passwd, configuration files). - Exposure of OpenProject configuration and secrets stored in readable files.
- Access to private project data stored on the server in readable paths.
- Leakage of environment-specific details that can facilitate follow-on attacks such as privilege escalation or lateral movement.
General mitigation guidance
Defenses generally focus on hardening file processing pipelines and limiting how external tools handle untrusted input:
- Restrict accepted file formats for attachments that will be processed or rendered server-side; validate both file extension and content type.
- Configure ImageMagick (via policy configuration) to disable high-risk coders and protocols, especially those that can access local files or external resources.
- Isolate the image processing component, for example by running it under a dedicated, least-privileged account with limited filesystem access.
- Apply strict allowlists for image operations used during PDF export, avoiding generalized parsing of complex formats like SVG when not required.
- Treat all user-supplied files as untrusted and avoid piping them directly into powerful interpreters without sanitization and policy enforcement.
How teams detect issues like this
Effective detection combines code-level review, configuration auditing, and runtime monitoring:
- Review the PDF export and attachment-processing code paths to identify where user-controlled files are passed to external tools such as ImageMagick.
- Use static analysis or manual review to flag generic calls to image processors that do not enforce strict format checks or safety policies.
- Audit ImageMagick policy configuration to ensure risky coders and file access capabilities are restricted, and verify these policies in test environments.
- Monitor application and system logs for unusual image processing errors, unexpected file access patterns, or repeated PDF exports involving atypical image types.
- Integrate security scanning tools that specifically look for unsafe use of ImageMagick and similar content processors in CI/CD pipelines.

