# Security Policy for OpenPDF
## Responsibility Disclaimer
OpenPDF is a general-purpose PDF generation and manipulation library. It is **not a sandboxed or hardened environment**. OpenPDF processes input data such as file paths, image sources, font names, and HTML content **as-is**, without performing input validation, authentication, or permission checks.
**It is the sole responsibility of the application developer to ensure that all input passed into OpenPDF is trusted, sanitized, and safe.**
OpenPDF does not implement any built-in mechanisms to protect against:
- Local file access
- Network access via file URLs
- Path traversal
- SSRF (Server-Side Request Forgery)
- Unsafe base64 content
- Memory exhaustion or denial-of-service from large or malformed PDFs
---
## Common Security Considerations
When using OpenPDF, application developers must consider the following security risks and implement proper countermeasures:
### 1. **Image Sources**
- OpenPDF supports image loading via:
- Local file paths
- Absolute file URIs (`file:///`)
- Base64-encoded strings
- External URLs (depending on usage)
- **Risk**: May allow attackers to read files like `/etc/passwd` or perform SSRF.
- **Recommended**: Disallow or strictly validate all image paths before passing them to OpenPDF.
### 2. **HTML Content and Inline Styles**
- OpenPDF parses HTML input and may honor embedded `
`, `