VYPR
Medium severity6.1NVD Advisory· Published Jun 15, 2026· Updated Jun 15, 2026

CVE-2026-49294

CVE-2026-49294

Description

Valhalla versions 3.6.3 and prior are vulnerable to reflected XSS via unsanitized JSONP callback parameter.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Valhalla versions 3.6.3 and prior are vulnerable to reflected XSS via unsanitized JSONP callback parameter.

Vulnerability

Valhalla versions 3.6.3 and prior are vulnerable to reflected cross-site scripting (XSS) due to improper neutralization of input in the JSONP callback parameter [1]. In src/worker.cc:718, the jsonp request parameter is stored unsanitized via options.set_jsonp() and subsequently written directly into the HTTP response body on both success and error paths, with Content-Type set to application/javascript [1]. No validation, output encoding, or allowlist filtering is applied to the callback value at any point in the data flow [1].

Exploitation

An attacker crafts a URL containing arbitrary JavaScript in the JSONP callback parameter, such as /route?json={"jsonp":"alert(document.cookie)//","locations":[{"lat":40,"lon":-74},{"lat":41,"lon":-75}]} [1]. The server responds with the injected JavaScript followed by JSON data and the Content-Type: application/javascript header [1]. The victim must be induced to load this URL via a `` tag, causing the injected script to execute in the context of the serving origin [1]. No authentication or prior access is required; the attack relies on social engineering to make the victim visit the crafted link.

Impact

Successful exploitation allows arbitrary JavaScript execution in the victim's browser session on the Valhalla origin [1]. This can lead to session token theft, credential disclosure, or actions performed on behalf of the victim within the application's security context [1].

Mitigation

No fix was available at the time of publication [1]. The advisory suggests a remediation in the form of a regex validation that restricts the callback value to ^[a-zA-Z_$][a-zA-Z0-9_$.]*$ [1]. Users are advised to apply such input validation or use a Content Security Policy (CSP) to mitigate script execution until an official patched release is provided [1].

AI Insight generated on Jun 15, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2
  • Valhalla/Valhallainferred2 versions
    <=3.6.3+ 1 more
    • (no CPE)range: <=3.6.3
    • (no CPE)range: <=3.6.3

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Missing validation and output encoding of the JSONP callback parameter allows arbitrary JavaScript injection into the HTTP response."

Attack vector

An attacker crafts a URL containing arbitrary JavaScript in the `jsonp` callback parameter (e.g., `/route?json={"jsonp":"alert(document.cookie)//",...}`). The server reflects the unsanitized callback value directly into the HTTP response body with `Content-Type: application/javascript` [ref_id=1]. If a victim is induced to load that URL via a `<script src="...">` tag, the injected script executes in the context of the serving origin, potentially leading to session token theft or credential disclosure [CWE-79].

What the fix does

The advisory recommends adding a regex validation on the `jsonp` parameter to restrict it to alphanumeric characters, underscores, dollar signs, and dots (`^[a-zA-Z_$][a-zA-Z0-9_$.]$`) before calling `options.set_jsonp()` [ref_id=1]. This would prevent an attacker from injecting arbitrary JavaScript because the callback value would be rejected if it contains parentheses, quotes, or other script-delimiting characters. At the time of publication, no patch has been applied.

Preconditions

  • inputVictim must load the crafted URL via a tag (e.g., from an attacker-controlled page or link).
  • networkNo authentication or special network position required; the service must be reachable.

Reproduction

curl -s "https://<VALHALLA_HOST>/route?json={\"jsonp\":\"alert(document.cookie)//\",\"locations\":[{\"lat\":40,\"lon\":-74},{\"lat\":41,\"lon\":-75}]}"

Generated on Jun 15, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

1

News mentions

0

No linked articles in our index yet.