/

CVE-2026-46409

Severity:

CRITICAL RISK

(9.6)

CORS Bypass (CWE-942) in OpenYak Desktop Local HTTP API

CVE-2026-46409

Deferred

Vulnerability type

Category:

CORS Misconfiguration

CWE:

CWE-94, CWE-306, CWE-346, CWE-352, CWE-942

Impact:

Remote Code Execution and Sensitive Data Exposure

Severity:

CRITICAL RISK

(9.6)

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

OpenYak's desktop backend exposes a loopback HTTP API without sufficient origin validation, authentication, request-type restrictions, or restrictive CORS controls. A malicious webpage could use the browser as a proxy to invoke local functions, potentially execute shell commands, stop the service, or access chat history and account-related information while OpenYak is running.

Affected context

The vulnerability occurs in OpenYak desktop deployments where the local backend listens on a loopback address and accepts browser-originated cross-origin requests without validating the requesting origin or requiring loopback authentication. Risk is higher when the build agent permits shell execution and when the API exposes service-control or sensitive conversation data operations.

Exploit preconditions

  • Attack surface: The OpenYak desktop backend's loopback HTTP API
  • Required access: The victim must have OpenYak running and visit a malicious or compromised webpage
  • Trigger point: A browser issues cross-origin requests to the local API
  • Why exploitation is possible: Missing origin validation, authentication, Content-Type enforcement, and restrictive CORS policy allow browser requests to reach privileged local operations
  • Additional condition for command execution: The configured build agent must permit shell operations

Why this happens

The backend treats requests from browser contexts as trusted without establishing a trustworthy caller identity. A wildcard CORS policy combined with absent server-side Origin checks and loopback authentication permits cross-origin browser requests to a local service; insufficient request validation can further broaden the accepted request surface. This primarily maps to CWE-942, with related exposure involving missing authentication, improper origin validation, cross-site request forgery, and command execution through privileged functionality.

Potential impact

  • A malicious webpage may invoke privileged local API operations
  • An attacker could execute shell commands when the agent permits bash execution
  • The desktop service could be stopped or disrupted
  • Chat history, account identifiers, or other local data could be exposed
  • The host or connected development environment could be compromised

General mitigation guidance

Mitigation generally focuses on treating the local API as a privileged

service rather than a trusted browser endpoint.

Common defensive patterns include:

  • Enforcing an explicit allowlist of trusted origins on every state-changing and sensitive request
  • Requiring strong per-installation authentication or capability-based tokens for loopback API access
  • Rejecting unexpected methods, content types, credentials, and request formats
  • Avoiding wildcard CORS and disabling browser access where cross-origin use is unnecessary
  • Separating high-risk shell execution from general desktop API operations
  • Applying least privilege to build agents, filesystem access, and process-control capabilities
  • Requiring explicit user authorization for sensitive actions and limiting access to chat or account data
  • Using defense-in-depth browser isolation and local firewall policies where appropriate

How teams detect issues like this

Organizations can identify similar weaknesses through:

  • Static analysis and configuration checks for wildcard CORS policies
  • Code review searches for missing Origin validation, absent authentication, and unrestricted loopback listeners
  • Tests that attempt cross-origin requests with unexpected methods, content types, and credentials
  • API inventory reviews to identify local endpoints exposing command execution, shutdown, or sensitive-data operations
  • Policy enforcement requiring authentication and origin restrictions for privileged local services
  • Dynamic security testing that observes whether an untrusted webpage can invoke sensitive loopback actions

Automated code review and API security tools may help flag these patterns during development.

Sources

SourceLink
github.comgithub.com/openyak/openyak/security/advisories/GHSA-ccxp-q2w5-27jw

Frequently asked

questions

The vulnerable service is local, but a remote attacker may be able to reach it indirectly when a user visits a malicious or compromised webpage. The browser can relay requests to the loopback backend.

The described attack does not require separate authentication to the OpenYak API when the service accepts unauthenticated browser requests. The victim generally needs only to have the desktop application running and browse to the attacker's page.

Treat the loopback API as privileged: require strong local authentication, validate allowed origins, reject unsafe request formats, and disable browser access unless it is explicitly needed.

Inventory local APIs, apply least privilege to exposed operations, test cross-origin behavior in CI, and require security review for endpoints that execute commands, control services, or return sensitive data.

Find out what's already
exploitable in your codebase.