{"answers":{"affected":"4 open source packages ship an affected version, including github.com/nats-io/nats-server/v2 and github.com/nats-io/nats-server.","exploited":"There is no known exploitation of GHSA-gwj5-3vfq-q992 in the wild and no public exploit code.","fix":"Upgrade github.com/nats-io/nats-server/v2 to 2.2.0 or later.","what":"GHSA-gwj5-3vfq-q992 is a denial of service vulnerability in github.com/nats-io/nats-server, published on 21 May 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-gwj5-3vfq-q992 and fix it if it is affected.\n\nWhat it is: GHSA-gwj5-3vfq-q992 is a denial of service vulnerability in github.com/nats-io/nats-server, published on 21 May 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-gwj5-3vfq-q992 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/nats-io/nats-server/v2 (Go): affected all versions; fixed in 2.2.0\n- github.com/nats-io/nats-server/v2 (Go): affected all versions; fixed in 2.2.0\n- github.com/nats-io/nats-server/v2 (Go): affected all versions; fixed in 2.2.0\n- github.com/nats-io/nats-server (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-gwj5-3vfq-q992/ (Markdown: https://insights.sbomify.com/GHSA-gwj5-3vfq-q992/index.md)","id":"GHSA-gwj5-3vfq-q992","markdown":"https://insights.sbomify.com/GHSA-gwj5-3vfq-q992/index.md","name":"GHSA-gwj5-3vfq-q992","record":{"aliases":["GO-2022-0398"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"NATS messaging server","requires_auth":"low_privilege","summary":"An attacker with an account can crash the NATS server by creating import loops, causing resource exhaustion and denial of service.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"(This advisory is canonically \u003chttps://advisories.nats.io/CVE/CVE-2020-28466.txt\u003e)\n\n## Problem Description\n\nAn export/import cycle between accounts could crash the nats-server, after consuming CPU and memory.\n\nThis issue was fixed publicly in \u003chttps://github.com/nats-io/nats-server/pull/1731\u003e in November 2020.\n\nThe need to call this out as a security issue was highlighted by `snyk.io` and we are grateful for their assistance in doing so.\n\nOrganizations which run a NATS service providing access to accounts run by untrusted third parties are affected.\nSee below for an important caveat if running such a service.\n\n## Affected versions\n\n#### NATS Server\n\n * Version 2 prior to 2.2.0\n   + 2.0.0 through and including 2.1.9 are vulnerable.\n * fixed with nats-io/nats-server PR 1731, commit 2e3c226729\n\n## Impact\n\nThe nats-server could be killed, after consuming resources.\n\n## Workaround\n\nThe import cycle requires at least two accounts to work; if you have open account sign-up, then restricting new account sign-up might hinder an attacker.\n\n## Solution\n\nUpgrade the nats-server.\n\n## Caveat on NATS with untrusted users\n\nRunning a NATS service which is exposed to untrusted users presents a heightened risk.\n\nAny remote execution flaw or equivalent seriousness, or denial-of-service by unauthenticated users, will lead to prompt releases by the NATS maintainers.\n\nFixes for denial of service issues with no threat of remote execution, when limited to account holders, are likely to just be committed to the main development branch with no special attention.\n\nThose who are running such services are encouraged to build regularly from git.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Import loops in account imports, nats-server DoS","id":"GHSA-gwj5-3vfq-q992","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2021"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/nats-io/nats-server","purl":"pkg:golang/github.com/nats-io/nats-server","source":"GO-2022-0398"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/nats-io/nats-server/v2","purl":null,"source":"GHSA-gwj5-3vfq-q992"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/nats-io/nats-server/v2","purl":"pkg:golang/github.com/nats-io/nats-server/v2","source":"GHSA-gwj5-3vfq-q992"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/nats-io/nats-server/v2","purl":"pkg:golang/github.com/nats-io/nats-server/v2","source":"GO-2022-0398"}],"products":null,"published":"2021-05-21","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker with an account can crash the NATS server by creating import loops, causing resource exhaustion and denial of service.","url":"https://insights.sbomify.com/GHSA-gwj5-3vfq-q992/"}