Medium, CVSS 4.3npmAmendedPublished
ApostropheCMS: Host header controls server-side image fetch origin in @apostrophecms/ai-helper, enabling authenticated SSRF
CVE-2026-113671 · GHSA-527g-ff96-x6wj
- Affected
- npm @apostrophecms/ai-helper >= 1.0.0-beta.10, < 1.0.0-beta.13
- Fixed in
- 1.0.0-beta.13· Vendor fix available
- Issue
- The @apostrophecms/ai-helper package builds the URL for a server-side image fetch by resolving a storage-relative path against req.baseUrl. When the site does not set a global base URL (the default), req.baseUrl is derived from the incoming HTTP Host header. An authenticated editor can generate a base64 AI image (which is persisted without a stored url) and then send an unauthorized PATCH accept request with an attacker-chosen Host header. The server then issues an outbound GET to the attacker-selected origin, producing a Server-Side Request Forgery primitive that reaches hosts and ports the client cannot otherwise contact. The affected code lives in packages/ai-helper/modules/@apostrophecms/ai-helper-image/index.js. Root Cause The image accept route trusts req.baseUrl as a safe origin for constructing an internal fetch target, but req.baseUrl is attacker-influenced whenever the site has no configured base URL. The URL builder concatenates a default local storage path (which…
Recommended action: Upgrade to 1.0.0-beta.13 (pre-release) or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.