CVE-2026-27571: Github.com/nats io/nats server/v2 Denial of Service Vulnerability
MODERATECVE-2026-27571 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Github.com/nats io/nats server/v2 libraries in the Go ecosystem. The issue involves nats-server websockets are vulnerable to pre-auth memory dos. Remediation is available by upgrading affected packages to version 2.11.12, 2.12.3.
CVE-2026-27571 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-27571
To remediate this vulnerability, upgrade all affected Github.com/nats io/nats server/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/nats-io/nats-server/v2 to 2.11.12
Upgrade github.com/nats-io/nats-server/v2 to 2.12.3
Upgrade github.com/nats-io/nats-server to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/nats-io/nats-server/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-27571, inspect your project dependencies for Github.com/nats io/nats server/v2:
inspect dependencies for github.com/nats-io/nats-server/v2
Analyze the terminal output to locate any version of Github.com/nats io/nats server/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.12), 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-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In Github.com/nats io/nats server/v2, 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
CVE-2026-27571 Affected Github.com/nats io/nats server/v2 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/nats-io/nats-server/v2
|
Go |
< 2.11.12
|
2.11.12
|
|
github.com/nats-io/nats-server/v2
|
Go |
≥ 2.12.0-RC.1
< 2.12.3
|
2.12.3
|
|
github.com/nats-io/nats-server
|
Go |
≤ 1.4.1
|
|
References
Frequently Asked Questions
What is CVE-2026-27571?
Which Github.com/nats io/nats server/v2 versions are affected?
What version fixes CVE-2026-27571?
Is github.com/nats-io/nats-server/v2 affected?
Is github.com/nats-io/nats-server affected?
What is the CVSS score of CVE-2026-27571?
What CWE is associated with CVE-2026-27571?
How can I check Go dependencies for CVE-2026-27571?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qrvq-68c2-7grw",
"modified" : "2026-02-27T20:03:26Z",
"published" : "2026-02-24T16:04:53Z",
"aliases" : [ "CVE-2026-27571" ],
"summary" : "nats-server websockets are vulnerable to pre-auth memory DoS",
"details" : "### Impact\n\nThe WebSockets handling of NATS messages handles compressed messages via the WebSockets negotiated compression. The implementation bound the memory size of a NATS message but did not independently bound the memory consumption of the memory stream when constructing a NATS message which might then fail validation for size reasons.\n\nAn attacker can use a compression bomb to cause excessive memory consumption, often resulting in the operating system terminating the server process.\n\nThe use of compression is negotiated before authentication, so this does not require valid NATS credentials to exploit.\n\nThe fix was to bounds the decompression to fail once the message was too large, instead of continuing on.\n\n### Patches\n\nThis was released in nats-server without being highlighted as a security issue. It should have been, this was an oversight. Per the NATS security policy, because this does not require a valid user, it is CVE-worthy.\n\nThis was fixed in the v2.11 series with v2.11.12 and in the v2.12 series with v2.12.3.\n\n### Workarounds\n\nThis only affects deployments which use WebSockets and which expose the network port to untrusted end-points.\n\n### References\n\nThis was reported to the NATS maintainers by Pavel Kohout of Aisle Research (www.aisle.com).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/nats-io/nats-server/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.11.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/nats-io/nats-server/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.12.0-RC.1"
}, {
"fixed" : "2.12.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/nats-io/nats-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/security/advisories/GHSA-qrvq-68c2-7grw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27571"
}, {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/commit/f77fb7c4535e6727cc1a2899cd8e6bbdd8ba2017"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nats-io/nats-server"
}, {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/releases/tag/v2.11.12"
}, {
"type" : "WEB",
"url" : "https://github.com/nats-io/nats-server/releases/tag/v2.12.3"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2026-4533"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-409", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-24T16:04:53Z",
"nvd_published_at" : "2026-02-24T17:29:03Z"
}
}