Do not open a public GitHub issue. Use GitHub Private Vulnerability Reporting (CVE issuance supported), or email dulanhewage2@hotmail.com if unavailable. Include: affected version/commit, minimal reproduction, impact, suggested fix. Acknowledgement within 5 business days; fix-or-explanation target within 30 days.
| Boundary | Risk | Mitigation |
|---|---|---|
POST endpoints (/resize, /convert, /optimize, /thumbnail, /info) |
Server-to-server over trusted network | Bearer API_KEY gate (constant-time compare); rate-limited per IP. Empty key = open by design. |
GET /process (browser fetch of remote src) |
Reached by browsers; secrets can't ship in HTML | Time-bound HMAC-signed URLs (SIGNING_KEY[S]); ALLOWED_DOMAINS allowlist; SSRF dial guard; redirect re-allowlist; masked fetch errors. |
Remote src fetch targets |
Untrusted — must not proxy internal networks | Dialer rejects RFC 1918, link-local (169.254.0.0/16 incl. cloud metadata), loopback, ULA, CGNAT, unspecified. DNS-rebinding to private range refused at dial time. |
Optimizer binaries (pngquant, cjpeg, cwebp, avifenc) |
Operator-controlled paths, fixed argv, no shell | User input never reaches argv. Missing tool → safe Go re-encode fallback, never a crash. |
| Uploaded image bytes | Untrusted input | stdlib image.Decode (EXIF dropped on decode). Body capped at MAX_FILE_SIZE_MB; source dims capped at MAX_DIMENSION / MaxDimCap = 100000. No external EXIF dep. |
/health,/,/openapi.*,/docs/*always open (orchestrators + Swagger UI). Don't expose/docsto untrusted networks unless spec is meant public./processopen by default (noSIGNING_KEY). Startup logsSECURITY: /process is openwhen this coincides withALLOWED_DOMAINS="*". Tighten both before public exposure.- Docker image runs non-root (
uid 10001) withHEALTHCHECKon/health.
API_KEY— strong random value for POST endpoints.SIGNING_KEY(orSIGNING_KEYSfor rotation) — sign every/processURL server-side. SeeREADME.md→ Authentication for Go/Node snippets;cmd/gensigfor a CLI helper.ALLOWED_DOMAINS— minimum set of source hosts, not*.- Reverse proxy terminating TLS + own rate limits / WAF.
- Read-only filesystem; cap outbound egress at network level (in-process SSRF guard is defence-in-depth, not a substitute for egress filtering).