/

CVE-2026-125331

Severity:

CRITICAL RISK

(9.1)

Broken Access Control (CWE-862) in HarnessRouter API

CVE-2026-125331

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-862, CWE-863

Impact:

Cross-organization configuration tampering and data exposure

Severity:

CRITICAL RISK

(9.1)

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

HarnessRouter can attach an internal service key to requests with an Authorization header before validating the bearer token, allowing certain service-only routes to accept requests that should not be authorized. In multi-organization deployments, a remote caller may use this behavior to change another organization's provider connection, potentially exposing prompts and influencing task responses.

Affected context

The issue concerns HarnessRouter deployments where the console is not in self-hosted mode and the service-only connection, policy, or internal routes are reachable. Risk is greatest in multi-organization environments because these routes trust the server's internal key and use the organization identifier supplied in the URL.

Exploit preconditions

  • Attack surface: Reachability of the affected HarnessRouter API routes
  • Required access: A remote caller able to send requests with an Authorization header; a valid bearer is not properly checked before the internal key is attached
  • Trigger point: Requests to the service-only connection or policy routes, or to /internal/*
  • Why exploitation is possible: The routes trust the attached internal key and derive the target organization from the URL, enabling unauthorized cross-organization changes in affected deployments

Why this happens

The authorization flow attaches a privileged internal key before validating the caller's bearer token. Downstream routes treat that key as sufficient authority and accept an organization identifier from the request URL without adequately checking that the caller is authorized for that organization. This reflects CWE-862: Missing Authorization and CWE-863: Incorrect Authorization: access controls are absent or incorrectly applied to sensitive operations.

Potential impact

  • An attacker could rewrite another organization's provider connection to point to an attacker-controlled endpoint.
  • Prompts sent through the altered connection may be disclosed to that endpoint.
  • Attacker-controlled responses could influence tasks or agent behavior.
  • Organization policy or internal operations could be exposed to unauthorized changes, depending on reachable routes.

General mitigation guidance

Defensive patterns include validating caller credentials before attaching or using any privileged internal identity, and checking authorization for each operation against the specific organization being accessed. Keep internal routes isolated from untrusted callers, avoid treating shared service keys as a substitute for user- and organization-level authorization, and apply least privilege to service identities. Where possible, reduce reliance on caller-controlled organization identifiers and use secure-by-default route and policy designs.

How teams detect issues like this

  • Review authentication middleware to ensure bearer validation occurs before privileged credentials are attached or trusted.
  • Use static analysis and code review to identify routes that rely solely on internal keys or accept organization identifiers from request paths without an authorization check.
  • Test authorization policies across organization boundaries, including requests with invalid or missing credentials.
  • Enforce API gateway or service policies that restrict access to internal and service-only routes and log denied or cross-organization access attempts.

Sources

SourceLink
github.comgithub.com/HarnessRouter/harnessrouter/commit/28609ec65ed671112d7e5418926bbd3cb3b25c00
github.comgithub.com/HarnessRouter/harnessrouter/pull/418
github.comgithub.com/HarnessRouter/harnessrouter/releases/tag/v0.31.8
github.comgithub.com/HarnessRouter/harnessrouter/security/advisories/GHSA-p6cq-54cg-8mpv

Frequently asked

questions

It may be exploitable by a remote caller if the affected routes are reachable and the deployment conditions apply.

The described issue does not require a valid bearer token; the key prerequisite is being able to send requests to the affected API routes. Network exposure and deployment configuration influence practical reachability.

Validate caller credentials before granting or attaching privileged identity, then authorize each requested action against the target organization.

Apply authorization checks at every sensitive route, test cross-organization boundaries, and restrict internal endpoints to trusted service identities and networks.

Find out what's already
exploitable in your codebase.