CVE-2026-113671
## Summary 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 is relative, for example `/uploads`) and resolves it against `req.baseUrl`; because the left operand is relative, the resulting origin is taken entirely from `req.baseUrl`. Two protections that exist elsewhere are missing on this path: the generate route enforces an edit capability, but the accept route performs no authorization or ownership check, and no allowlist or validation constrains the resolved origin before the fetch. ```text packages/ai-helper/modules/@apostrophecms/ai-helper-image/index.js aiHelperImageUrl (line 91-92): image.url || new URL(self.uploadfs.getUrl() + `/ai-helper-images/${image._id}.png`, req.baseUrl) aiHelperFetchImage (line 64-65): fetch(self.aiHelperImageUrl(req, image)) apiRoutes.patch['ai-helper/:_id'] (line 314-333): findOne({ _id }) only; no permission or ownership check packages/apostrophe/modules/@apostrophecms/i18n/index.js setPrefixUrls (line 799-820): req.baseUrl falls back to `${req.protocol}://${host}`, host f
Properties
- Summary
- ApostropheCMS: Host header controls server-side image fetch origin in @apostrophecms/ai-helper, enabling authenticated SSRF
- Severity
- medium
- Nvd fetched at
- 2026-10-20T21:14:08.448323+00:00
- Cvss score
- 4.3
- Cvss severity
- MEDIUM
- Retrieved at
- 2026-10-21T01:23:59+00:00
- Ghsa published
- 2026-10-20T18:11:01Z
- Source url
- https://github.com/advisories/GHSA-527g-ff96-x6wj
- Ghsa updated
- 2026-10-20T18:11:01Z
- Ghsa id
- GHSA-527g-ff96-x6wj
- Last source
- GitHub Advisory Database
- Score
- 4.3
- Cvss version
- 3.1
- Cve id
- CVE-2026-113671
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- First seen by Signal
- 2026-10-20T21:15:35+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Published at
- 2026-10-20T18:17:20.813
- Last modified
- 2026-10-20T19:53:10.247
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Explore deeper with Ninja Signal's threat intelligence graph