MEDIUM 6.1

CVE-2026-49294: Valhalla JSONP Callback XSS Vulnerability (Versions ≤3.6.3)

Valhalla, an open-source routing engine for OpenStreetMap data, contains a cross-site scripting (XSS) vulnerability in versions 3.6.3 and earlier. The flaw exists in how the application handles JSONP callback parameters—user-supplied values are reflected directly into responses without filtering or encoding. An attacker can inject malicious JavaScript by crafting a specially formatted URL; if a victim clicks or loads that URL, the attacker's script runs in the victim's browser with the same privileges as legitimate requests, potentially allowing theft of session tokens, credential capture, or unauthorized actions. This is a reflected XSS vulnerability requiring user interaction but with relatively broad impact potential.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
0 configuration(s)
Published / Modified
2026-06-15 / 2026-06-17

NVD description (verbatim)

Valhalla is an open source routing engine and accompanying libraries for use with OpenStreetMap data. 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. When a request specifies a JSONP callback, the value is reflected directly into the HTTP response body with Content-Type: application/javascript, without any validation, output encoding, or allowlist filtering. An attacker can craft a URL containing arbitrary JavaScript in the callback parameter; 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, credential disclosure, or actions performed on behalf of the victim. This issue was not fixed at time of publication.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

Valhalla's JSONP callback handler accepts arbitrary callback parameter values and reflects them into the HTTP response body with Content-Type: application/javascript without validation, output encoding, or allowlist enforcement. When a victim loads a malicious URL via a <script> tag or other mechanism, the injected JavaScript executes in the same origin context as the legitimate application, bypassing same-origin policy protections for JSONP patterns. The vulnerability is rooted in CWE-79 (Improper Neutralization of Input During Web Page Generation) and affects all versions up to and including 3.6.3. No patch was available at the time of publication.

Business impact

Organizations relying on Valhalla for routing services may expose end users or internal systems to session hijacking, credential theft, or unauthorized transaction execution. If Valhalla is integrated into a web application or API layer serving authenticated users, a successful XSS attack could compromise user trust, enable lateral movement into downstream systems, or result in data exfiltration. The requirement for user interaction (clicking a malicious link) limits broad-scale exploitation but does not eliminate risk, especially in environments where social engineering is effective or where URLs are shared via messaging systems.

Affected systems

Valhalla versions 3.6.3 and prior are vulnerable. The risk applies to deployments where Valhalla is exposed via HTTP endpoints that accept JSONP callbacks, particularly in public-facing routing services or embedded mapping applications. Projects bundling Valhalla as a dependency and exposing its JSONP endpoints without additional security controls are at highest risk. Development and staging environments using affected versions are also in scope if they handle real or sensitive data.

Exploitability

Exploitation requires user interaction—a victim must visit or load a URL crafted by the attacker. However, the attack surface is significant: any URL-sharing mechanism (chat, email, social media, embedded links in web pages) can distribute the malicious payload. The vulnerability is trivially exploitable from a technical standpoint (no special tools, complex techniques, or authentication required), making it attractive to opportunistic attackers. The reflected nature means each attack is a discrete incident; persistent compromise is not achieved through this vector alone. CVSS 6.1 (Medium) reflects the balance between broad network accessibility, low complexity, required user interaction, and moderate confidentiality and integrity impact.

Remediation

Immediate action is to review which internal or customer-facing applications depend on Valhalla and whether they expose JSONP endpoints. If JSONP functionality is not required, disable or remove callback parameter support entirely. If JSONP is necessary, implement strict output encoding and callback parameter validation—whitelist acceptable callback names or enforce that callback values match a defined pattern (e.g., alphanumeric characters only). Upgrade to a patched version once available from the Valhalla project; monitor the official GitHub repository or security advisories for release announcements. For applications where patching is delayed, consider deploying a Web Application Firewall (WAF) rule to block requests with suspicious callback parameter content.

Patch guidance

As of the publication date, no official patch has been released for Valhalla. Monitor the Valhalla project's GitHub releases page and security advisory channels for version 3.6.4 or later. When a patch becomes available, test it thoroughly in a non-production environment to ensure compatibility with your specific integration before deploying to production. Organizations unable to patch immediately should implement compensating controls such as callback parameter validation at the application or WAF level, or disable JSONP support if operationally feasible.

Detection guidance

Search for HTTP requests to Valhalla endpoints containing callback parameters with suspicious values—look for JavaScript keywords (e.g., 'alert', 'fetch', 'XMLHttpRequest', 'eval'), special characters (semicolons, parentheses, angle brackets), or URL-encoded payloads. Monitor web application logs and WAF telemetry for callback parameter anomalies. Check HTTP responses with Content-Type: application/javascript for unexpected script content. In development environments, use security scanning tools to identify JSONP endpoints and test callback parameter handling. Network-based detection should flag callback parameters containing script-like syntax patterns.

Why prioritize this

While CVSS scores this as Medium severity, prioritization depends on context. Organizations with public-facing Valhalla instances or those embedding Valhalla in user-facing applications should treat this as higher priority, particularly if users are authenticated or handle sensitive data. The attack requires user interaction but is otherwise unconstrained—no special tools, no authentication, and trivial to exploit. Lack of a patch at publication amplifies urgency; remediation through workarounds or controls is necessary immediately rather than deferred to a future patch cycle.

Risk score, explained

CVSS 6.1 reflects: (1) Network accessibility with no authentication required (AV:N, PR:N); (2) Low attack complexity—standard XSS injection techniques (AC:L); (3) Required user interaction—victim must click or load the malicious URL (UI:R); (4) Changed scope—the script runs in the browser and can affect other origins via JSONP patterns (S:C); (5) Low confidentiality impact—session tokens or credentials can be stolen (C:L); (6) Low integrity impact—the attacker can perform actions on behalf of the user within that origin (I:L); (7) No availability impact (A:N). The score balances broad attack surface and easy exploitation against the need for user interaction and moderate impact.

Frequently asked questions

Does this vulnerability require authentication to exploit?

No. Valhalla's JSONP callback parameter accepts input from any request, regardless of authentication status. An attacker can craft a malicious URL and distribute it; if a victim clicks it, the attack succeeds. Authentication to Valhalla itself is not a prerequisite, though authenticated users may be at higher risk if the injected script harvests session tokens.

How is this different from stored XSS?

This is reflected XSS—the malicious payload is not stored on the server and does not persist. Each attack is a discrete, targeted incident. An attacker must craft a unique URL and induce a victim to visit it. Stored XSS, by contrast, would compromise all users accessing an affected page. Reflected XSS is often considered lower severity, but in this case, the broad distribution potential and ease of exploitation keep the risk material.

If we disable JSONP callbacks, are we safe?

Disabling JSONP callback support entirely would eliminate this specific vulnerability. However, verify that your application does not rely on JSONP for legitimate use cases (e.g., cross-origin data fetching without CORS). If JSONP is required, implement strict callback parameter validation and output encoding rather than disabling the feature.

Does the CVSS score reflect that no patch is available?

CVSS is a point-in-time temporal assessment and does not directly factor in patch availability. The 6.1 score reflects the intrinsic severity of the vulnerability based on attack complexity, required interaction, and impact scope. The absence of a patch elevates operational risk and should influence your remediation timeline and the aggressiveness of compensating controls you deploy.

This analysis is based on the CVE-2026-49294 description published on 2026-06-15 and modified 2026-06-17. As of publication, no official patch was available; verify current patch status with the Valhalla project before implementing. CVSS score 6.1 is provided by the official CVE record and reflects that snapshot in time. Organizations should evaluate their specific deployment context and integration of Valhalla to assess true business risk. This summary does not constitute legal, compliance, or procurement advice; consult with your security and legal teams regarding remediation timelines and compensating controls. Source: NVD (public-domain), retrieved 2026-07-24. Analysis generated by SEC.co (claude-haiku-4-5).