Vulnerabilities in pkg:npm/@gitlawb/openclaude

PACKAGE
Advisory Identifier: GHSA-c73c-x77g-854r
Advisory Summary

CVE-2026-42073 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting OpenClaude MCP OAuth Callback libraries in the npm ecosystem. The issue involves state check bypass via error param leads to dos. Remediation is available by upgrading affected packages to version 0.5.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@gitlawb/openclaude

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@gitlawb/openclaude. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c73c-x77g-854r CVE-2026-42073 MODERATE OpenClaude MCP OAuth Callback: State Check Bypass via error Param Leads to DoS
GHSA-m6rx-7pvw-2f73 CVE-2026-35570 HIGH OpenClaude: Sandbox Bypass via Early-Exit Logic Flaw Allows Path Traversal

CVE-2026-42073 at a Glance

CVE Identifier CVE-2026-42073
GHSA Identifier GHSA-c73c-x77g-854r
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product OpenClaude MCP OAuth Callback
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-42073

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

@gitlawb/openclaude fixed: 0.5.1
npm install @gitlawb/openclaude@0.5.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 @gitlawb/openclaude

How to Check if You Are Affected

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

npm ls @gitlawb/openclaude

Analyze the terminal output to locate any version of OpenClaude MCP OAuth Callback in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.1), your application is affected.

Note: The npm ls @gitlawb/openclaude 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In OpenClaude MCP OAuth Callback, 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

# OAuth State Validation Bypass via `error` Parameter Causes Local Server DoS in MCP Auth Callback --- ## Description The OpenClaude MCP authentication flow starts a temporary local HTTP server to handle OAuth callbacks. To prevent CSRF attacks, the server validates a `state` parameter against an internally stored value. However, due to a logic flaw in the order of conditionals, an attacker can completely bypass this check and force the server to shut down — without knowing the `state` value at all. The vulnerable code looks like this: ```typescript if (!error && state !== oauthState) { rejectOnce(new Error('OAuth state mismatch - possible CSRF attack')) return } if (error) { cleanup() rejectOnce(new Error(errorMessage)) return } ``` When a request arrives with an `error` query parameter (e.g., `?error=anything`), the first condition becomes `false` because `!error` evaluates to `false`. This means the CSRF check is **never reached**. Execution falls through to the second block, where `cleanup()` is called — shutting down the local server and terminating the user's active authentication session. The attacker does not need to know the `state` value. Any request containing an `error` parameter is enough to trigger the shutdown. --- ## Impact - The user's OAuth flow is silently terminated mid-session - The local callback server is shut down (Denial of Service) - Can be triggered remotely via a malicious web page using a cross-origin request (CSRF) - No authentication or prior knowledge of the `state` value is required --- ## Steps to Reproduce Save the following as `poc.js` and run with Node.js: ```javascript import { createServer } from 'http'; import { parse } from 'url'; const expectedState = "secure_state_abc123"; const server = createServer((req, res) => { const parsedUrl = parse(req.url || '', true); const { pathname, query } = parsedUrl; const { state, error } = query; if (pathname === '/callback') { // Vulnerable: error param causes state check to be skipped entirely if (!error && state !== expectedState) { res.writeHead(400); res.end('State mismatch'); console.log('[-] CSRF attempt blocked.'); return; } if (error) { res.writeHead(200); res.end(`Error: ${error}`); console.log(`[!] Server shutting down. Triggered by: ${error}`); server.close(); return; } } }); server.listen(12345, '127.0.0.1', () => { console.log('Listening on http://127.0.0.1:12345'); }); ``` **Terminal 1 — start the server:** ```bash node poc.js ``` **Terminal 2 — trigger the bypass:** ```bash curl "http://127.0.0.1:12345/callback?error=triggered" ``` **Expected result:** Server shuts down immediately. The `state` value was never checked. --- ## Root Cause The CSRF protection is conditioned on `!error`, meaning it is silently disabled whenever an `error` parameter is present. The two checks need to be decoupled — state validation must happen first, independently of any other parameters. --- ## Fix Move the `state` check before the `error` check, and remove the dependency on `!error`: ```typescript // Fixed if (state !== oauthState) { cleanup() rejectOnce(new Error('OAuth state mismatch - possible CSRF attack')) return } if (error) { cleanup() rejectOnce(new Error(errorMessage)) return } ``` With this change, any request — whether it contains an `error` parameter or not — must first pass the state validation before any further processing occurs. --- Credit: Xanlar Agamalizade

CVE-2026-42073 Affected OpenClaude MCP OAuth Callback Versions

1 component(s)
Fixed Versions:
0.5.1
Product / Package Ecosystem Affected Versions Fixed Version
@gitlawb/openclaude
npm
< 0.5.1
0.5.1

References

Frequently Asked Questions

What is CVE-2026-42073?
CVE-2026-42073 is a security vulnerability in OpenClaude MCP OAuth Callback involving State Check Bypass via error Param Leads to DoS under CWE-400: Uncontrolled Resource Consumption.
Which OpenClaude MCP OAuth Callback versions are affected?
Affected versions include releases prior to 0.5.1 across affected packages: @gitlawb/openclaude.
What version fixes CVE-2026-42073?
Upgrading to 0.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @gitlawb/openclaude affected?
Yes, @gitlawb/openclaude is affected in releases prior to 0.5.1. Upgrade your dependency to 0.5.1 or later.
What is the CVSS score of CVE-2026-42073?
CVE-2026-42073 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-42073?
CVE-2026-42073 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-42073?
Run the dependency tree command: 'npm ls @gitlawb/openclaude'. 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-c73c-x77g-854r",
  "modified" : "2026-06-09T10:59:32Z",
  "published" : "2026-05-12T15:34:30Z",
  "aliases" : [ "CVE-2026-42073" ],
  "summary" : "OpenClaude MCP OAuth Callback: State Check Bypass via error Param Leads to DoS",
  "details" : "# OAuth State Validation Bypass via `error` Parameter Causes Local Server DoS in MCP Auth Callback\n---\n\n## Description\n\nThe OpenClaude MCP authentication flow starts a temporary local HTTP server to handle OAuth callbacks. To prevent CSRF attacks, the server validates a `state` parameter against an internally stored value. However, due to a logic flaw in the order of conditionals, an attacker can completely bypass this check and force the server to shut down — without knowing the `state` value at all.\n\nThe vulnerable code looks like this:\n\n```typescript\nif (!error && state !== oauthState) {\n    rejectOnce(new Error('OAuth state mismatch - possible CSRF attack'))\n    return\n}\n\nif (error) {\n    cleanup()\n    rejectOnce(new Error(errorMessage))\n    return\n}\n```\n\nWhen a request arrives with an `error` query parameter (e.g., `?error=anything`), the first condition becomes `false` because `!error` evaluates to `false`. This means the CSRF check is **never reached**. Execution falls through to the second block, where `cleanup()` is called — shutting down the local server and terminating the user's active authentication session.\n\nThe attacker does not need to know the `state` value. Any request containing an `error` parameter is enough to trigger the shutdown.\n\n---\n\n## Impact\n\n- The user's OAuth flow is silently terminated mid-session\n- The local callback server is shut down (Denial of Service)\n- Can be triggered remotely via a malicious web page using a cross-origin request (CSRF)\n- No authentication or prior knowledge of the `state` value is required\n\n---\n\n## Steps to Reproduce\n\nSave the following as `poc.js` and run with Node.js:\n\n```javascript\nimport { createServer } from 'http';\nimport { parse } from 'url';\n\nconst expectedState = \"secure_state_abc123\";\n\nconst server = createServer((req, res) => {\n    const parsedUrl = parse(req.url || '', true);\n    const { pathname, query } = parsedUrl;\n    const { state, error } = query;\n\n    if (pathname === '/callback') {\n\n        // Vulnerable: error param causes state check to be skipped entirely\n        if (!error && state !== expectedState) {\n            res.writeHead(400);\n            res.end('State mismatch');\n            console.log('[-] CSRF attempt blocked.');\n            return;\n        }\n\n        if (error) {\n            res.writeHead(200);\n            res.end(`Error: ${error}`);\n            console.log(`[!] Server shutting down. Triggered by: ${error}`);\n            server.close();\n            return;\n        }\n    }\n});\n\nserver.listen(12345, '127.0.0.1', () => {\n    console.log('Listening on http://127.0.0.1:12345');\n});\n```\n\n**Terminal 1 — start the server:**\n```bash\nnode poc.js\n```\n\n**Terminal 2 — trigger the bypass:**\n```bash\ncurl \"http://127.0.0.1:12345/callback?error=triggered\"\n```\n\n**Expected result:** Server shuts down immediately. The `state` value was never checked.\n\n---\n\n## Root Cause\n\nThe CSRF protection is conditioned on `!error`, meaning it is silently disabled whenever an `error` parameter is present. The two checks need to be decoupled — state validation must happen first, independently of any other parameters.\n\n---\n\n## Fix\n\nMove the `state` check before the `error` check, and remove the dependency on `!error`:\n\n```typescript\n// Fixed\nif (state !== oauthState) {\n    cleanup()\n    rejectOnce(new Error('OAuth state mismatch - possible CSRF attack'))\n    return\n}\n\nif (error) {\n    cleanup()\n    rejectOnce(new Error(errorMessage))\n    return\n}\n```\n\nWith this change, any request — whether it contains an `error` parameter or not — must first pass the state validation before any further processing occurs.\n\n---\n\nCredit: Xanlar Agamalizade",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@gitlawb/openclaude"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Gitlawb/openclaude/security/advisories/GHSA-c73c-x77g-854r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42073"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Gitlawb/openclaude/commit/739b8d1f40fde0e401a5cbd2b9a55d88bd5124ad"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Gitlawb/openclaude"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Gitlawb/openclaude/releases/tag/v0.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352", "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-12T15:34:30Z",
    "nvd_published_at" : "2026-06-02T17:16:31Z"
  }
}