CVE-2026-55445: @whyour/qinglong Improper Authentication Vulnerability

CRITICAL
Advisory Identifier: GHSA-v667-gc2r-2xm7
CWE-287
Published
Advisory Summary

CVE-2026-55445 is a CRITICAL improper authentication vulnerability (CWE-287: Improper Authentication) affecting @whyour/qinglong libraries in the npm ecosystem. The issue involves improper authentication. Remediation is available by upgrading affected packages to version 2.20.1.

CVE-2026-55445 at a Glance

CVE Identifier CVE-2026-55445
GHSA Identifier GHSA-v667-gc2r-2xm7
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product @whyour/qinglong
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-55445

To remediate this vulnerability, upgrade all affected @whyour/qinglong dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@whyour/qinglong fixed: 2.20.1
npm install @whyour/qinglong@2.20.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @whyour/qinglong

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-55445, inspect your project dependencies using npm:

npm ls @whyour/qinglong

Analyze the terminal output to locate any version of @whyour/qinglong in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.20.1), your application is affected.

Note: The npm ls @whyour/qinglong command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In @whyour/qinglong, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The init guard middleware in Qinglong only checks `/api/user/init` paths but not `/open/user/init`, which is whitelisted from JWT authentication and rewritten to `/api/user/init` after the guard has already passed, allowing unauthenticated admin credential reset on initialized instances. ### Affected Package - **Ecosystem:** npm - **Package:** whyour/qinglong - **Affected versions:** < 6bec52dca158 - **Patched versions:** >= 6bec52dca158 ### Severity Medium ### CWE CWE-287 — Improper Authentication ### Details The Qinglong panel has an initialization endpoint (`/api/user/init`) that allows setting admin credentials. Once the system is initialized, an init guard middleware is supposed to block further calls. The middleware in `back/loaders/express.ts` only checks: ```javascript !['/api/user/init', '/api/user/notification/init'].includes(pathLower) ``` However, the application also has a URL rewrite rule: `rewrite('/open/*', '/api/$1')`. The `/open/*` paths are whitelisted from JWT authentication. The middleware ordering creates the bypass: first, JWT auth sees `/open/*` paths match the whitelist regex and skips authentication. Second, the init guard only checks for `/api/user/init` -- `/open/user/init` passes through as "not an init path". Third, the URL rewrite transforms `/open/user/init` to `/api/user/init` after the guard has already passed. This means an unauthenticated attacker can send `PUT /open/user/init` with new credentials to reset the admin account on any Qinglong panel instance, gaining full administrative access. ### PoC ```javascript /** * CVE-2026-3965 - Qinglong Panel /open/user/init Auth Bypass * * The init guard middleware only checks /api/user/init paths. * But /open/user/init is whitelisted from JWT auth and rewritten * to /api/user/init via express-urlrewrite AFTER the guard. */ "use strict"; // Simulate the init guard middleware exactly as in the source function initGuardMiddleware(reqPath, authInfo) { const pathLower = reqPath.toLowerCase(); // Exact check from the vulnerable source if (!['/api/user/init', '/api/user/notification/init'].includes(pathLower)) { return { action: "next" }; // passes through } let isInitialized = true; if ( Object.keys(authInfo).length === 2 && authInfo.username === 'admin' && authInfo.password === 'admin' ) { isInitialized = false; } if (isInitialized) { return { action: "block", code: 450, message: "Error" }; } else { return { action: "next" }; } } const authInfo = { username: "realAdmin", password: "str0ngP@ss!" }; console.log("System state: initialized (non-default credentials)"); // Test 1: Direct /api/user/init is blocked const test1 = initGuardMiddleware("/api/user/init", authInfo); console.log("\n[Test 1] PUT /api/user/init:"); console.log(" Guard result:", test1.action); console.log(" Blocked:", test1.action === "block"); // Test 2: /open/user/init BYPASSES init guard const test2 = initGuardMiddleware("/open/user/init", authInfo); console.log("\n[Test 2] PUT /open/user/init:"); console.log(" Guard result:", test2.action); console.log(" Bypassed guard:", test2.action === "next"); if (test2.action === "next") { const rewrittenPath = "/open/user/init".replace(/^\/open\//, "/api/"); console.log(" After rewrite:", rewrittenPath); console.log(" Reaches init handler: true"); } if (test1.action === "block" && test2.action === "next") { console.log("\nVULNERABILITY CONFIRMED: /open/user/init bypasses the init guard"); console.log("An attacker can reset admin credentials on an initialized instance."); process.exit(0); } else { console.log("\nVULNERABILITY NOT CONFIRMED"); process.exit(1); } ``` **Steps to reproduce:** 1. `git clone https://github.com/whyour/qinglong /tmp/qinglong_test` 2. `cd /tmp/qinglong_test && git checkout 6bec52dc~1` 3. `node poc.js` **Expected output:** ``` VULNERABILITY CONFIRMED /open/user/init bypasses the init guard; the guard only checks /api/user/init but /open/ path is whitelisted and rewritten after. ``` ### Impact An unauthenticated attacker can send `PUT /open/user/init` with new credentials to reset the admin account on any Qinglong panel instance. This provides full administrative access, enabling the attacker to execute arbitrary cron jobs and scripts on the server. ### Suggested Remediation Add `/open/user/init` and `/open/user/notification/init` to the init guard check list. Alternatively, move the URL rewrite middleware to run before the init guard. Consider implementing the init guard at the handler level rather than as path-based middleware. ### References - Incomplete fix commit: https://github.com/whyour/qinglong/commit/6bec52dca158481258315ba0fc2f11206df7b719 - Original CVE: CVE-2026-3965

CVE-2026-55445 Affected @whyour/qinglong Versions

1 component(s)
Fixed Versions:
2.20.1
Product / Package Ecosystem Affected Versions Fixed Version
@whyour/qinglong
npm
< 2.20.1
2.20.1

References

Frequently Asked Questions

What is CVE-2026-55445?
CVE-2026-55445 is a security vulnerability in @whyour/qinglong involving Improper Authentication under CWE-287: Improper Authentication.
Which @whyour/qinglong versions are affected?
Affected versions include releases prior to 2.20.1 across affected packages: @whyour/qinglong.
What version fixes CVE-2026-55445?
Upgrading to 2.20.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @whyour/qinglong affected?
Yes, @whyour/qinglong is affected in releases prior to 2.20.1. Upgrade your dependency to 2.20.1 or later.
What CWE is associated with CVE-2026-55445?
CVE-2026-55445 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2026-55445?
Run the dependency tree command: 'npm ls @whyour/qinglong'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v667-gc2r-2xm7",
  "modified" : "2026-08-20T18:36:59Z",
  "published" : "2026-08-20T18:36:59Z",
  "aliases" : [ "CVE-2026-55445" ],
  "summary" : "Qinglong has an incomplete fix for CVE-2026-3965: Improper Authentication",
  "details" : "### Summary\n\nThe init guard middleware in Qinglong only checks `/api/user/init` paths but not `/open/user/init`, which is whitelisted from JWT authentication and rewritten to `/api/user/init` after the guard has already passed, allowing unauthenticated admin credential reset on initialized instances.\n\n### Affected Package\n\n- **Ecosystem:** npm\n- **Package:** whyour/qinglong\n- **Affected versions:** < 6bec52dca158\n- **Patched versions:** >= 6bec52dca158\n\n### Severity\n\nMedium\n\n### CWE\n\nCWE-287 — Improper Authentication\n\n### Details\n\nThe Qinglong panel has an initialization endpoint (`/api/user/init`) that allows setting admin credentials. Once the system is initialized, an init guard middleware is supposed to block further calls. The middleware in `back/loaders/express.ts` only checks:\n\n```javascript\n!['/api/user/init', '/api/user/notification/init'].includes(pathLower)\n```\n\nHowever, the application also has a URL rewrite rule: `rewrite('/open/*', '/api/$1')`. The `/open/*` paths are whitelisted from JWT authentication.\n\nThe middleware ordering creates the bypass: first, JWT auth sees `/open/*` paths match the whitelist regex and skips authentication. Second, the init guard only checks for `/api/user/init` -- `/open/user/init` passes through as \"not an init path\". Third, the URL rewrite transforms `/open/user/init` to `/api/user/init` after the guard has already passed.\n\nThis means an unauthenticated attacker can send `PUT /open/user/init` with new credentials to reset the admin account on any Qinglong panel instance, gaining full administrative access.\n\n### PoC\n\n```javascript\n/**\n * CVE-2026-3965 - Qinglong Panel /open/user/init Auth Bypass\n *\n * The init guard middleware only checks /api/user/init paths.\n * But /open/user/init is whitelisted from JWT auth and rewritten\n * to /api/user/init via express-urlrewrite AFTER the guard.\n */\n\n\"use strict\";\n\n// Simulate the init guard middleware exactly as in the source\nfunction initGuardMiddleware(reqPath, authInfo) {\n  const pathLower = reqPath.toLowerCase();\n  // Exact check from the vulnerable source\n  if (!['/api/user/init', '/api/user/notification/init'].includes(pathLower)) {\n    return { action: \"next\" }; // passes through\n  }\n\n  let isInitialized = true;\n  if (\n    Object.keys(authInfo).length === 2 &&\n    authInfo.username === 'admin' &&\n    authInfo.password === 'admin'\n  ) {\n    isInitialized = false;\n  }\n\n  if (isInitialized) {\n    return { action: \"block\", code: 450, message: \"Error\" };\n  } else {\n    return { action: \"next\" };\n  }\n}\n\nconst authInfo = { username: \"realAdmin\", password: \"str0ngP@ss!\" };\nconsole.log(\"System state: initialized (non-default credentials)\");\n\n// Test 1: Direct /api/user/init is blocked\nconst test1 = initGuardMiddleware(\"/api/user/init\", authInfo);\nconsole.log(\"\\n[Test 1] PUT /api/user/init:\");\nconsole.log(\"  Guard result:\", test1.action);\nconsole.log(\"  Blocked:\", test1.action === \"block\");\n\n// Test 2: /open/user/init BYPASSES init guard\nconst test2 = initGuardMiddleware(\"/open/user/init\", authInfo);\nconsole.log(\"\\n[Test 2] PUT /open/user/init:\");\nconsole.log(\"  Guard result:\", test2.action);\nconsole.log(\"  Bypassed guard:\", test2.action === \"next\");\n\nif (test2.action === \"next\") {\n  const rewrittenPath = \"/open/user/init\".replace(/^\\/open\\//, \"/api/\");\n  console.log(\"  After rewrite:\", rewrittenPath);\n  console.log(\"  Reaches init handler: true\");\n}\n\nif (test1.action === \"block\" && test2.action === \"next\") {\n  console.log(\"\\nVULNERABILITY CONFIRMED: /open/user/init bypasses the init guard\");\n  console.log(\"An attacker can reset admin credentials on an initialized instance.\");\n  process.exit(0);\n} else {\n  console.log(\"\\nVULNERABILITY NOT CONFIRMED\");\n  process.exit(1);\n}\n```\n\n**Steps to reproduce:**\n1. `git clone https://github.com/whyour/qinglong /tmp/qinglong_test`\n2. `cd /tmp/qinglong_test && git checkout 6bec52dc~1`\n3. `node poc.js`\n\n**Expected output:**\n```\nVULNERABILITY CONFIRMED\n/open/user/init bypasses the init guard; the guard only checks /api/user/init but /open/ path is whitelisted and rewritten after.\n```\n\n### Impact\n\nAn unauthenticated attacker can send `PUT /open/user/init` with new credentials to reset the admin account on any Qinglong panel instance. This provides full administrative access, enabling the attacker to execute arbitrary cron jobs and scripts on the server.\n\n### Suggested Remediation\n\nAdd `/open/user/init` and `/open/user/notification/init` to the init guard check list. Alternatively, move the URL rewrite middleware to run before the init guard. Consider implementing the init guard at the handler level rather than as path-based middleware.\n\n### References\n\n- Incomplete fix commit: https://github.com/whyour/qinglong/commit/6bec52dca158481258315ba0fc2f11206df7b719\n- Original CVE: CVE-2026-3965",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@whyour/qinglong"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.20.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/whyour/qinglong/security/advisories/GHSA-v667-gc2r-2xm7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-55445"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/whyour/qinglong/pull/2941"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/whyour/qinglong/commit/6bec52dca158481258315ba0fc2f11206df7b719"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/whyour/qinglong"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:36:59Z",
    "nvd_published_at" : "2026-07-15T22:17:26Z"
  }
}