/

CVE-2026-34932

Severity:

CRITICAL RISK

(9.3)

XSS in Hoppscotch API Development Ecosystem

CVE-2026-34932

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored XSS leading to CSRF-style actions in victim sessions

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

Hoppscotch contained a stored cross-site scripting (XSS) vulnerability where attacker-controlled input could be saved and later executed in the browser of other users.

When triggered, this script execution could be abused to perform cross-site request forgery (CSRF)-style actions in the context of the victim's authenticated Hoppscotch session.

Affected context

The vulnerability affects Hoppscotch components that persist user-supplied data and later render it into web views seen by other users without consistently applying output encoding.

This typically involves shared or collaborative areas of the application where one user's input is stored on the server and subsequently displayed in other users' browsers in an HTML context.

The issue is more risky in deployments where multiple users share workspaces or resources and where authentication cookies or tokens are automatically sent with Hoppscotch requests.

Exploit preconditions

  • Attack surface: Web interface of Hoppscotch, specifically features that store and later render user-generated content.
  • Required access: Ability to create or edit content within a Hoppscotch instance (e.g., shared collections, environments, or other collaborative artifacts).
  • Trigger point: A victim user visits a page or view that renders the malicious stored content in their browser.
  • Why exploitation is possible: The application stores untrusted input and later inserts it into an HTML/JavaScript context without robust context-aware output encoding or sanitization, allowing attacker-supplied script to execute in the victim's browser. Once active, the script inherits the victim's session and can issue unauthorized requests (CSRF-like behavior).

Why this happens

This vulnerability stems from improper neutralization of input before it is included in web pages, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

The application logic accepts and persists user-controlled data, but when rendering this data back to the client, it fails to enforce strict output encoding or sanitization tailored to the specific HTML/JavaScript context.

As a result, attacker-controlled markup or script fragments can break out of the intended data context and execute as active script within the victim's browser, enabling session-bound actions that resemble CSRF.

Potential impact

  • Execution of arbitrary JavaScript in the victim's browser within the Hoppscotch origin
  • Unauthorized actions performed on behalf of the victim (CSRF-style interactions)
  • Theft or misuse of session identifiers, API tokens, or sensitive in-app data accessible to the victim
  • Manipulation of API development data, such as modifying or exfiltrating collections, environments, or request definitions
  • Lateral movement within a shared workspace by impersonating other users' sessions

General mitigation guidance

Effective mitigation centers on strict output encoding and minimizing trust in persisted user content:

  • Apply context-aware output encoding for all user-supplied data when rendering into HTML, attribute, URL, JavaScript, or CSS contexts.
  • Favor UI components and templating mechanisms that auto-escape content by default, avoiding raw HTML insertion APIs.
  • Enforce input validation and normalization to constrain allowed content types where rich HTML is not strictly required.
  • Introduce content sanitization for any feature that must support rich text, allowing only a minimal, well-defined subset of safe markup.
  • Harden CSRF defenses separately (e.g., state-changing requests requiring strong anti-CSRF mechanisms and re-validation of user intent), so that even if XSS occurs, its ability to perform unauthorized actions is reduced.
  • Adopt a principle of least privilege in session and token scope, limiting the damage from any single compromised browser context.

How teams detect issues like this

Detection typically combines code-level analysis and behavior-focused review:

  • Use static analysis or linters to flag dangerous HTML rendering patterns, such as direct insertion of user input into template literals, DOM APIs, or innerHTML-like sinks.
  • During code review, look for flows where persisted data is displayed without a clear encoding step or where escape mechanisms are explicitly disabled.
  • Implement security-focused UI tests that attempt to store benign XSS test payloads and then verify that they are rendered as inert text rather than executing.
  • Incorporate automated security scanning tools (DAST/SAST) into CI pipelines to identify XSS-like patterns across the codebase and rendered pages.
  • Monitor application logs and client-side error metrics for anomalous script execution or unexpected DOM manipulation originating from stored content fields.

Sources

SourceLink
github.comgithub.com/hoppscotch/hoppscotch/releases/tag/2026.3.0
github.comgithub.com/hoppscotch/hoppscotch/security/advisories/GHSA-wj4r-hr4h-g98v

Frequently asked

questions

Yes. An attacker can exploit it remotely by injecting malicious content into a shared or publicly accessible part of a Hoppscotch instance and then inducing other users to view that content through normal application usage or crafted links.

It generally requires whatever level of access is needed to create or modify the affected stored content (for example, access to a workspace or collection).

Once malicious content is stored, any user with permission to view that content may be at risk, and their authenticated session can be abused by the injected script.

The most robust fix is to ensure that all stored user input is treated as data, not code: use context-aware output encoding at every render point, rely on templating systems that escape by default, and optionally sanitize any content that must support limited markup.

Adopt a secure-by-default frontend architecture that forbids raw HTML injection, enforce strict coding guidelines around user input handling, integrate automated XSS-focused testing and static analysis into the development lifecycle, and perform regular security reviews of any new feature that stores and re-displays user-generated content.

Find out what's already
exploitable in your codebase.