Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-50561

CVE-2026-50561: Yuxi Platform Auth Bypass Vulnerability

CVE-2026-50561 is an authentication bypass flaw in Yuxi knowledge base platform that allows attackers to gain admin access using tokens from other instances. This post covers technical details, affected versions, and mitigation.

Published:

CVE-2026-50561 Overview

CVE-2026-50561 is an authentication bypass vulnerability in Yuxi, a large-model-based intelligent knowledge base and knowledge graph agent development platform. Versions prior to 0.6.2 fail to sufficiently validate identity tokens presented in the Authorization header, performing only a validity check rather than binding tokens to a specific deployment instance. An attacker who obtains or generates an administrator token from any other Yuxi deployment (including local testing environments) can reuse that token to authenticate as an administrator against a different affected instance. Successful exploitation grants full administrative control over backend management interfaces. The issue is tracked under [CWE-287: Improper Authentication].

Critical Impact

An attacker with a valid administrator token from any Yuxi instance can access system configurations, invoke backend management APIs, create administrator accounts, and take over the backend of any other affected instance sharing default JWT configuration.

Affected Products

  • Yuxi versions prior to 0.6.2
  • Yuxi deployments using the default JWT_SECRET_KEY value
  • Yuxi backend management interfaces exposed to untrusted networks

Discovery Timeline

  • 2026-08-12 - CVE-2026-50561 published to NVD
  • 2026-08-12 - Last updated in NVD database

Technical Details for CVE-2026-50561

Vulnerability Analysis

The vulnerability originates in Yuxi's FastAPI authentication middleware, which validates JSON Web Tokens (JWTs) from the Authorization header using only signature and expiration checks. The middleware does not verify that a token was issued for the specific deployment instance processing the request. Because pre-0.6.2 releases ship with a default or predictable JWT_SECRET_KEY, tokens minted by any deployment using that key are cryptographically valid across every other instance sharing the same secret.

An attacker who deploys Yuxi locally can generate a legitimate administrator JWT, then present that token to any exposed Yuxi backend. The middleware in backend/server/utils/auth_middleware.py accepts the token, loads the administrator context, and grants access to management APIs. The attacker can then create new administrator accounts and persist control over the system.

Root Cause

The root cause is missing instance binding in the token validation flow combined with a shared default secret. There is no instance_id, audience (aud), or issuer (iss) claim check that would prevent cross-instance token reuse. The .env.template file did not previously enforce operators setting a unique JWT_SECRET_KEY per deployment.

Attack Vector

Exploitation is network-based, requires no privileges, and requires no user interaction. An attacker performs the following steps:

  1. Deploy a local Yuxi instance or acquire a valid administrator token from another instance.
  2. Extract or generate an administrator JWT signed with the default JWT_SECRET_KEY.
  3. Send authenticated requests to the target Yuxi backend management API with the token in the Authorization: Bearer <token> header.
  4. Use administrator API endpoints to create persistent accounts and modify system configuration.
python
 from fastapi import Depends, Header, HTTPException, status
 from fastapi.security import OAuth2PasswordBearer
 from jose import JWTError
-from sqlalchemy.ext.asyncio import AsyncSession
 from sqlalchemy import select
-
+from sqlalchemy.ext.asyncio import AsyncSession
 from yuxi.storage.postgres.manager import pg_manager
-from yuxi.storage.postgres.models_business import User, APIKey
-from server.utils.auth_utils import AuthUtils
+from yuxi.storage.postgres.models_business import APIKey, User
 from yuxi.utils.datetime_utils import utc_now_naive
 
+from server.utils.auth_utils import AuthUtils
+
 # 定义OAuth2密码承载器,指定token URL
 oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/api/auth/token", auto_error=False)

Source: GitHub Commit 1e8b20e — patch to backend/server/utils/auth_middleware.py.

Detection Methods for CVE-2026-50561

Indicators of Compromise

  • Authentication requests to /api/auth/ or backend management endpoints bearing JWTs signed with the shipped default JWT_SECRET_KEY.
  • Creation of new administrator accounts without a preceding legitimate administrator login session.
  • Access to backend management APIs from IP addresses that never completed an interactive /api/auth/token password exchange.

Detection Strategies

  • Audit application logs for administrator API calls whose associated JWT jti or issuance timestamp does not correspond to any local login event.
  • Decode JWTs seen in production and flag tokens whose signing key matches the default JWT_SECRET_KEY shipped in .env.template.
  • Alert on privilege changes and administrator account creation events originating from unfamiliar source addresses or user agents.

Monitoring Recommendations

  • Forward FastAPI access logs and Yuxi authentication events to a centralized logging pipeline for correlation.
  • Monitor for repeated requests to backend management routes without a corresponding session establishment.
  • Track configuration changes made through management APIs and alert on out-of-hours modifications.

How to Mitigate CVE-2026-50561

Immediate Actions Required

  • Upgrade Yuxi to version 0.6.2 or later, which introduces per-instance JWT configuration and stricter token validation.
  • Set JWT_SECRET_KEY to a unique, cryptographically strong value for every deployment instance.
  • Rotate any existing administrator credentials and invalidate previously issued JWTs after upgrading.
  • Restrict network exposure of backend management interfaces to trusted administrative networks.

Patch Information

The vulnerability is fixed in Yuxi 0.6.2. The patch introduces new environment variables (YUXI_ENV, JWT_SECRET_KEY, YUXI_INSTANCE_ID) and updates the authentication middleware. See the GitHub Security Advisory GHSA-6959-99pq-c56x and the remediation commit for full details.

Workarounds

  • Set JWT_SECRET_KEY in the environment to a non-default, high-entropy value unique per deployment.
  • Do not expose Yuxi backend management interfaces directly to the public internet; place them behind a VPN or reverse proxy with additional authentication.
  • Restrict inbound traffic to management API paths using network ACLs or a web application firewall.
bash
# Configuration example: harden JWT settings per deployment (Yuxi 0.6.2+)
YUXI_ENV=production
JWT_SECRET_KEY=$(openssl rand -hex 64)
YUXI_INSTANCE_ID=$(uuidgen)

# Verify the values are set and unique before starting the service
env | grep -E 'YUXI_ENV|JWT_SECRET_KEY|YUXI_INSTANCE_ID'

Source: GitHub Commit 1e8b20e — updates to .env.template.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.