GHSA-fcrh-fqxh-6fx6 Idno Vulnerable to Unauthenticated SSRF via URL Unfurl Endpoint
SummaryA logic error in the API authentication flow causes the CSRF protection on the URL unfurl service endpoint to be trivially bypassed by any unauthenticated remote attacker. Combined with the absence of a login requirement on the endpoint itself, this allows an attacker to force the server to make arbitrary outbound HTTP requests to any host, including internal network addresses and cloud instance metadata services, and retrieve the response content.**Component**: `Idno/Pages/Service/Web/UrlUnfurl.php`, `Idno/Core/Session.php`, `Idno/Core/Actions.php`  
**Vulnerability Class**: [Server-Side Request Forgery (SSRF)](https://cwe.mitre.org/data/definitions/918.html)
**Authentication Required**: None  
**CVSSv4 Base Score:** 9.2 (High) - [AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N](https://www.first.org/cvss/calculator/4.0#CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N)
**Affected Endpoint**: GET `/service/web/unfurl?url=<attacker-controlled-url>`
Handled by `Idno\Pages\Service\Web\UrlUnfurl::getContent()`.
**Affected Versions**: <= 1.6.3Code FlowStep 1 — Endpoint access control`UrlUnfurl::getContent()` (UrlUnfurl.php:36) enforces two access controls:  
`$this->xhrGatekeeper();`
`$this->tokenGatekeeper();`Notably, the original authentication check (`$this->gatekeeper()`) was explicitly removed with the following comment left in the source:This leaves the endpoint accessible to unauthenticated users, with only the two remaining gatekeepers as a barrier.Step 2 — Bypassing xhrGatekeeper()`Page::xhrGatekeeper()` (Page.php:876) checks whether the request was made with the X-Requested-With:
XMLHttpRequest header:This check is trivially bypassed by any HTTP client capable of setting custom headers.Step 3 — Bypassing `tokenGatekeeper()` via premature API flag`Page::tokenGatekeeper()` (Page.php:887) calls `Actions::validateToken()`:`Actions::validateToken()` (Actions.php:23) short-circuits entirely when `isAPIRequest()` returns true:`isAPIRequest()` reads the `is_api_request` flag from the session:The flag is set in `Session::tryAuthUser()` (Session.php:488), which runs early in the request lifecycle. The critical defect is here:`setIsAPIRequest(true)` is called unconditionally as soon as both `X-IDNO-USERNAME` and `X-IDNO-SIGNATURE` headers are present, regardless of whether the supplied credentials are valid. The HMAC verification that follows is therefore irrelevant — by the time `tokenGatekeeper()` calls `validateToken()`, the API flag is already set and the token check returns true immediately.An attacker supplying any non-empty values for these two headers — real or fabricated — bypasses CSRF protection entirely.Step 4 — The unfurl fetchWith both gatekeepers bypassed, execution reaches `UnfurledUrl::unfurl()` (UnfurledUrl.php:53):`FILTER_VALIDATE_URL` accepts any valid URL including http://localhost/, http://169.254.169.254/, and http://10.0.0.1/. There is no allowlist, blocklist, or restriction on private/loopback address ranges.
The fetched content is parsed for OpenGraph metadata and mf2 microformats, then returned to the caller in a JSON response, giving the attacker a full read of the response body from the internal target.Proof of ConceptStep 1: Run a webserver on the server running Idno to emulate an internal service. Ensure this server is not accessible localhost.Step 2: Verify that you cannot reach this server from a different systemStep 3: Make a request to the unfurl URL with required headers and observe that you can reach the internal service.https://github.com/user-attachments/assets/6b8c7728-94e3-4b5e-ba7f-c0908e75d08cImpactAny unauthenticated remote attacker can force the server to issue HTTP requests to arbitrary destinations and retrieve response content. Practical attack scenarios include:Cloud instance metadata exfiltration (AWS, GCP, Azure): The SSRF can reach the instance metadata service. On AWS with IMDSv1 (the default prior to late 2019 and still common on older instances), this exposes temporary IAM
credentials, which can be used to gain full access to the associated cloud account. On GCP and Azure
equivalent endpoints expose OAuth tokens and subscription details.Internal network reconnaissance: The attacker can probe internal hosts and ports by observing response content and timing differences. Open ports responding to HTTP return content; ports with no HTTP listener produce an error or timeout. This allows mapping of internal services (databases, caches, admin panels, other web applications) that are not exposed to the public internet.Access to localhost-restricted services: Web applications and administration interfaces commonly restrict access to 127.0.0.1. The SSRF bypasses this restriction by routing requests through the server itself. This includes Idno's own admin interface if it is firewall-restricted, as well as co-located services such as database administration tools, monitoring dashboards, and internal APIs.Interaction with internal services
Services such as Redis (default: no authentication), Memcached, and internal HTTP APIs may be reachable and manipulable via crafted URLs, potentially enabling cache poisoning, data exfiltration, or triggering state-changing operations on internal systems.RemediationMove `setIsAPIRequest(true)` to after successful HMAC verification:Defence in depth — block private address ranges in unfurl():
The unfurl function should reject requests to RFC 1918 addresses, loopback, and link-local ranges:Note: An attempt was made to email the address provided in the [security page](security@idno.co) but the address does not exist.
CVSS v4.0 score: 9.2