CVE-2026-53508: Github.com/oasdiff/oasdiff Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-2jcc-mxv7-p3f9
CWE-693 CWE-73 CWE-918
Published
Advisory Summary

CVE-2026-53508 is a MODERATE remote code execution vulnerability (CWE-693: Protection Mechanism Failure) affecting Github.com/oasdiff/oasdiff libraries in the Go ecosystem. The issue involves oasdiff does not enforce --allow-external-refs=false on the git-revision load path (ssrf / local file read). Remediation is available by upgrading affected packages to version 1.18.1.

CVE-2026-53508 at a Glance

CVE Identifier CVE-2026-53508
GHSA Identifier GHSA-2jcc-mxv7-p3f9
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Github.com/oasdiff/oasdiff
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-53508

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

github.com/oasdiff/oasdiff fixed: 1.18.1
Upgrade github.com/oasdiff/oasdiff to 1.18.1
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/oasdiff/oasdiff

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-53508, inspect your project dependencies for Github.com/oasdiff/oasdiff:

inspect dependencies for github.com/oasdiff/oasdiff

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Github.com/oasdiff/oasdiff, 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 From **v1.13.2** through **v1.18.0**, oasdiff did not enforce `--allow-external-refs=false` (library: `openapi3.Loader.IsExternalRefsAllowed = false`) when loading a spec from a **git revision** (the `rev:path` form, e.g. `main:openapi.yaml`). External `$ref`s were resolved on that load path even when external refs were explicitly disabled, so the mitigation silently did not apply there. ## Impact A caller who set `--allow-external-refs=false` *specifically to safely process untrusted specs* remained exposed — on the git-revision load path only — to: - **SSRF** via `$ref: "http://<internal-host>/…"`, and - **Local file reads** via `$ref: "/path"` or `file://`. Affected callers: - **CLI:** `oasdiff diff main:openapi.yaml HEAD:openapi.yaml --allow-external-refs=false` (and `breaking` / `changelog` / `summary`, and the `git-diff-driver`) run over untrusted spec content. - **Go library consumers** of `github.com/oasdiff/oasdiff/load` that set `IsExternalRefsAllowed = false` and load from a git-revision source via `load.NewSpecInfo`. The file and URL load paths correctly enforced the setting; only the git-revision path was affected. Callers that left external refs at the default (`true`) are not in scope for *this* advisory. ## Patches **v1.18.1** enforces the external-refs policy on the git-revision path (so `--allow-external-refs=false` now blocks external `$ref`s there) and returns a dedicated exit code (`123`) when an external `$ref` is refused. ## Workarounds - Upgrade to **v1.18.1**, or - Avoid the git-revision input form when processing untrusted specs with external refs disabled. ## Notes - Introduced in **v1.13.2** (#832, which added `$ref`-chain resolution on the git-revision path); fixed in **v1.18.1** (#974, #975). - The permissive **default** (`allow-external-refs: true`) and its zero-interaction exposure in CI via the GitHub Action is tracked separately in GHSA-fhj3-7267-7vv5 (oasdiff-action).

CVE-2026-53508 Affected Github.com/oasdiff/oasdiff Versions

1 component(s)
Fixed Versions:
1.18.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/oasdiff/oasdiff
Go
≥ 1.13.2
< 1.18.1
1.18.1

References

Frequently Asked Questions

What is CVE-2026-53508?
CVE-2026-53508 is a security vulnerability in Github.com/oasdiff/oasdiff involving oasdiff does not enforce --allow-external-refs=false on the git-revision load path (SSRF / local file read) under CWE-693: Protection Mechanism Failure.
Which Github.com/oasdiff/oasdiff versions are affected?
Affected versions include releases prior to 1.18.1 across affected packages: github.com/oasdiff/oasdiff.
What version fixes CVE-2026-53508?
Upgrading to 1.18.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/oasdiff/oasdiff affected?
Yes, github.com/oasdiff/oasdiff is affected in releases prior to 1.18.1. Upgrade your dependency to 1.18.1 or later.
What CWE is associated with CVE-2026-53508?
CVE-2026-53508 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check Go dependencies for CVE-2026-53508?
Run the dependency tree command: 'inspect dependencies for github.com/oasdiff/oasdiff'. 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-2jcc-mxv7-p3f9",
  "modified" : "2026-07-07T23:45:05Z",
  "published" : "2026-07-07T23:45:05Z",
  "aliases" : [ "CVE-2026-53508" ],
  "summary" : "oasdiff does not enforce --allow-external-refs=false on the git-revision load path (SSRF / local file read)",
  "details" : "## Summary\n\nFrom **v1.13.2** through **v1.18.0**, oasdiff did not enforce `--allow-external-refs=false` (library: `openapi3.Loader.IsExternalRefsAllowed = false`) when loading a spec from a **git revision** (the `rev:path` form, e.g. `main:openapi.yaml`). External `$ref`s were resolved on that load path even when external refs were explicitly disabled, so the mitigation silently did not apply there.\n\n## Impact\n\nA caller who set `--allow-external-refs=false` *specifically to safely process untrusted specs* remained exposed — on the git-revision load path only — to:\n\n- **SSRF** via `$ref: \"http://<internal-host>/…\"`, and\n- **Local file reads** via `$ref: \"/path\"` or `file://`.\n\nAffected callers:\n\n- **CLI:** `oasdiff diff main:openapi.yaml HEAD:openapi.yaml --allow-external-refs=false` (and `breaking` / `changelog` / `summary`, and the `git-diff-driver`) run over untrusted spec content.\n- **Go library consumers** of `github.com/oasdiff/oasdiff/load` that set `IsExternalRefsAllowed = false` and load from a git-revision source via `load.NewSpecInfo`.\n\nThe file and URL load paths correctly enforced the setting; only the git-revision path was affected. Callers that left external refs at the default (`true`) are not in scope for *this* advisory.\n\n## Patches\n\n**v1.18.1** enforces the external-refs policy on the git-revision path (so `--allow-external-refs=false` now blocks external `$ref`s there) and returns a dedicated exit code (`123`) when an external `$ref` is refused.\n\n## Workarounds\n\n- Upgrade to **v1.18.1**, or\n- Avoid the git-revision input form when processing untrusted specs with external refs disabled.\n\n## Notes\n\n- Introduced in **v1.13.2** (#832, which added `$ref`-chain resolution on the git-revision path); fixed in **v1.18.1** (#974, #975).\n- The permissive **default** (`allow-external-refs: true`) and its zero-interaction exposure in CI via the GitHub Action is tracked separately in GHSA-fhj3-7267-7vv5 (oasdiff-action).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/oasdiff/oasdiff"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.2"
      }, {
        "fixed" : "1.18.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.18.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/oasdiff/oasdiff/security/advisories/GHSA-2jcc-mxv7-p3f9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oasdiff/oasdiff/pull/832"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oasdiff/oasdiff/pull/974"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oasdiff/oasdiff/pull/975"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oasdiff/oasdiff"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693", "CWE-73", "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-07T23:45:05Z",
    "nvd_published_at" : null
  }
}