/

CVE-2026-55486

Severity:

CRITICAL RISK

(9.3)

Reflected XSS (CWE-79) in Goobi viewer Auth Endpoints

CVE-2026-55486

Deferred

Vulnerability type

Category:

Reflected Cross-Site Scripting

CWE:

CWE-79, CWE-113, CWE-1336

Impact:

Client-Side Code Execution and Session Compromise

Severity:

CRITICAL RISK

(9.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A reflected cross-site scripting vulnerability in Goobi viewer's IIIF Auth 2.0 login and token endpoints allows attacker-controlled origin values to be returned in security headers and HTML responses. When a victim follows a crafted authentication-flow link, the unescaped value may execute JavaScript in the viewer's browser.

A reflected cross-site scripting vulnerability in Goobi viewer's IIIF Auth 2.0 login and token endpoints allows attacker-controlled origin values to be returned in security headers and HTML responses. When a victim follows a crafted authentication-flow link, the unescaped value may execute JavaScript in the viewer's browser.

Affected context

The issue affects Goobi viewer deployments using the IIIF Auth 2.0 authorization flow. It occurs when the auth/login or auth/token endpoint accepts an origin query parameter without validating or contextually escaping it before placing the value in a Content-Security-Policy response header and an HTML JavaScript postMessage argument.

The issue affects Goobi viewer deployments using the IIIF Auth 2.0 authorization flow. It occurs when the auth/login or auth/token endpoint accepts an origin query parameter without validating or contextually escaping it before placing the value in a Content-Security-Policy response header and an HTML JavaScript postMessage argument.

Exploit preconditions

  • Attack surface: Publicly reachable IIIF Auth 2.0 login and token endpoints
  • Required access: No authenticated account may be required; the attacker must be able to send crafted authentication-flow requests to a victim
  • Trigger point: Processing of the attacker-controlled origin query parameter during login or token flow responses
  • Why exploitation is possible: The value is reflected into HTTP and JavaScript contexts without appropriate validation and output encoding, allowing browser-interpreted script content
  • Attack surface: Publicly reachable IIIF Auth 2.0 login and token endpoints
  • Required access: No authenticated account may be required; the attacker must be able to send crafted authentication-flow requests to a victim
  • Trigger point: Processing of the attacker-controlled origin query parameter during login or token flow responses
  • Why exploitation is possible: The value is reflected into HTTP and JavaScript contexts without appropriate validation and output encoding, allowing browser-interpreted script content

Why this happens

The underlying bug is insufficient input validation and context-sensitive output encoding. An attacker-controlled query parameter is reused in a Content-Security-Policy header and embedded in a single-quoted JavaScript postMessage argument without ensuring that it is safe for either context. This maps primarily to CWE-79: Improper Neutralization of Input During Web Page Generation, with related concerns involving response header injection and unsafe template or script-context construction.

The underlying bug is insufficient input validation and context-sensitive output encoding. An attacker-controlled query parameter is reused in a Content-Security-Policy header and embedded in a single-quoted JavaScript postMessage argument without ensuring that it is safe for either context. This maps primarily to CWE-79: Improper Neutralization of Input During Web Page Generation, with related concerns involving response header injection and unsafe template or script-context construction.

Potential impact

  • JavaScript may execute in a victim's browser under the application's origin
  • An attacker could access or alter data available to the affected web application
  • Authentication-flow information or session-related data could be exposed
  • Malicious scripts could perform actions through the victim's active session
  • The vulnerability could undermine trust in embedded or framed viewer content
  • JavaScript may execute in a victim's browser under the application's origin
  • An attacker could access or alter data available to the affected web application
  • Authentication-flow information or session-related data could be exposed
  • Malicious scripts could perform actions through the victim's active session
  • The vulnerability could undermine trust in embedded or framed viewer content

General mitigation guidance

Mitigation generally focuses on treating query parameters as untrusted data across every output context.

Common defensive patterns include:

  • Allowlisting valid origins and rejecting unexpected or malformed values
  • Applying context-specific encoding for HTTP headers, HTML, and JavaScript strings
  • Avoiding direct interpolation into executable JavaScript and using structured data serialization instead
  • Constructing security headers through validated policy objects rather than string concatenation
  • Applying least privilege to browser sessions and limiting sensitive actions exposed to authenticated clients
  • Adding regression tests for special characters, delimiter breaking, and cross-context injection attempts

Mitigation generally focuses on treating query parameters as untrusted data across every output context.

Common defensive patterns include:

  • Allowlisting valid origins and rejecting unexpected or malformed values
  • Applying context-specific encoding for HTTP headers, HTML, and JavaScript strings
  • Avoiding direct interpolation into executable JavaScript and using structured data serialization instead
  • Constructing security headers through validated policy objects rather than string concatenation
  • Applying least privilege to browser sessions and limiting sensitive actions exposed to authenticated clients
  • Adding regression tests for special characters, delimiter breaking, and cross-context injection attempts

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify request parameters concatenated into HTML, JavaScript, or response headers
  • Code review checks for unvalidated origin, URL, and redirect parameters
  • Tests that verify rejected or safely encoded delimiter, quote, and script-like input
  • Runtime monitoring for unusual authentication-flow parameters and reflected script markers
  • Security policies requiring allowlisted origins and context-aware output encoding
  • Automated application security testing that exercises reflected input across HTML, JavaScript, and header contexts

Organizations can look for this weakness through:

  • Static analysis rules that identify request parameters concatenated into HTML, JavaScript, or response headers
  • Code review checks for unvalidated origin, URL, and redirect parameters
  • Tests that verify rejected or safely encoded delimiter, quote, and script-like input
  • Runtime monitoring for unusual authentication-flow parameters and reflected script markers
  • Security policies requiring allowlisted origins and context-aware output encoding
  • Automated application security testing that exercises reflected input across HTML, JavaScript, and header contexts

Sources

SourceLink
github.comgithub.com/intranda/goobi-viewer-core/commit/0e488c6b02a28c1d1a747dfe3958ad2bbcff2d0b
github.comgithub.com/intranda/goobi-viewer-core/releases/tag/v26.05
github.comgithub.com/intranda/goobi-viewer-core/security/advisories/GHSA-975w-g9gj-xq48

Frequently asked

questions

Yes. The affected authentication endpoints may be reachable over the network, and exploitation can involve sending a crafted request or link to a victim. Successful script execution still depends on the victim interacting with the flow in a browser.

Not necessarily. The described flow can be initiated through the login and token endpoints, so the important prerequisite is access to the endpoint and a victim using the affected application.

Validate origins against an explicit allowlist and use context-specific output encoding. Avoid inserting request parameters directly into JavaScript, HTML, or security-header strings.

Treat all request parameters as untrusted, use structured APIs for response generation, enforce security-focused code review rules, and test every reflection point across its actual output context.

Yes. The affected authentication endpoints may be reachable over the network, and exploitation can involve sending a crafted request or link to a victim. Successful script execution still depends on the victim interacting with the flow in a browser.

Not necessarily. The described flow can be initiated through the login and token endpoints, so the important prerequisite is access to the endpoint and a victim using the affected application.

Validate origins against an explicit allowlist and use context-specific output encoding. Avoid inserting request parameters directly into JavaScript, HTML, or security-header strings.

Treat all request parameters as untrusted, use structured APIs for response generation, enforce security-focused code review rules, and test every reflection point across its actual output context.

Find out what's already
exploitable in your codebase.