# CVE-2026-50160: Mass Assignment via Onboarding Endpoint Allows Unauthenticated JWT_SECRET Overwrite

> Unauthenticated attackers can overwrite JWT secrets via mass assignment in self-hosted Hoppscotch, enabling token forgery and full server compromise.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 1 Jul 2026
- **Updated:** 2 Jul 2026
- **Also known as:** GHSA-j542-4rch-8hwf

## What is CVE-2026-50160?

CVE-2026-50160 is a critical missing authorization vulnerability in hoppscotch, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Hoppscotch is an API development ecosystem. In self-hosted deployments of hoppscotch-backend from version 2026.4.1 and earlier, the unauthenticated POST /v1/onboarding/config endpoint is vulnerable to mass assignment. The global NestJS ValidationPipe is configured without whitelist: true, so extra properties on the request body that are not declared in SaveOnboardingConfigRequest are not stripped and are iterated in the service layer as if they were legitimate InfraConfig entries. Because keys such as JWT_SECRET and SESSION_SECRET are valid InfraConfigEnum values and are not explicitly rejected during validation, an unauthenticated attacker who can reach a fresh instance before onboarding completes (or when no users exist) can overwrite these values in the database. Overwriting JWT_SECRET gives the attacker control of the JWT signing key, allowing them to forge tokens for any user, including administrators, and results in full server compromise. The issue is fixed in hoppscotch 2026.5.0.

Weakness: CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes)

## Which versions are affected by CVE-2026-50160?

It affects 1 product.


Products: Hoppscotch Hoppscotch.

## How do I fix CVE-2026-50160?

No fix has been published for CVE-2026-50160 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-50160 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50160 exists.

Public exploit code:

- Hoppscotch <= 2026.4.1 - Mass Assignment JWT_SECRET Overwrite (nuclei): http/cves/2026/CVE-2026-50160.yaml

## Other vulnerabilities in hoppscotch

- [CVE-2026-28215](https://insights.sbomify.com/CVE-2026-28215/): hoppscotch Vulnerable to Unauthenticated Onboarding Config Takeover (critical 9.1)
- [CVE-2026-34931](https://insights.sbomify.com/CVE-2026-34931/): hoppscotch: Improper loopback redirect_uri validation in device-login flow (high 8.5)
- [CVE-2026-34932](https://insights.sbomify.com/CVE-2026-34932/): hoppscotch: Stored XSS via mock server responses on backend origin (high 8.5)
- [CVE-2026-28216](https://insights.sbomify.com/CVE-2026-28216/): hoppscotch has IDOR in updateUserEnvironment / deleteUserEnvironment (high 8.3)
- [CVE-2022-0121](https://insights.sbomify.com/CVE-2022-0121/): Cross-site Scripting in hoppscotch/hoppscotch (high 8.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-50160 and fix it if it is affected.

What it is: CVE-2026-50160 is a critical missing authorization vulnerability in hoppscotch, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50160 exists.

Affected product: hoppscotch. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-50160/ (Markdown: https://insights.sbomify.com/CVE-2026-50160/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-50160
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-50160
- OSV: https://osv.dev/vulnerability/CVE-2026-50160

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-50160/
Summaries are generated and may contain mistakes; the official description above is the record.
