From bd36f6c4f652448c872ac7b57efea95faba53ea5 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 15:24:18 +0000 Subject: [PATCH] Publish Advisories GHSA-j756-f273-xhp4 GHSA-62mh-w5cv-p88c --- .../GHSA-j756-f273-xhp4.json | 52 ++++--------------- .../GHSA-62mh-w5cv-p88c.json | 14 +++-- 2 files changed, 22 insertions(+), 44 deletions(-) diff --git a/advisories/github-reviewed/2021/05/GHSA-j756-f273-xhp4/GHSA-j756-f273-xhp4.json b/advisories/github-reviewed/2021/05/GHSA-j756-f273-xhp4/GHSA-j756-f273-xhp4.json index d79f0912131..98b38de483c 100644 --- a/advisories/github-reviewed/2021/05/GHSA-j756-f273-xhp4/GHSA-j756-f273-xhp4.json +++ b/advisories/github-reviewed/2021/05/GHSA-j756-f273-xhp4/GHSA-j756-f273-xhp4.json @@ -1,12 +1,12 @@ { "schema_version": "1.4.0", "id": "GHSA-j756-f273-xhp4", - "modified": "2023-08-30T18:08:21Z", + "modified": "2024-05-21T15:22:51Z", "published": "2021-05-21T16:22:20Z", "aliases": [ ], - "summary": "github.com/nats-io/nats-server/ Import token permissions checking not enforced", + "summary": "github.com/nats-io/nats-server Import token permissions checking not enforced", "details": "(This advisory is canonically )\n\n## Problem Description\n\nThe NATS server provides for Subjects which are namespaced by Account; all Subjects are supposed to be private to an account, with an Export/Import system used to grant cross-account access to some Subjects. Some Exports are public, such that anyone can import the relevant subjects, and some Exports are private, such that the Import requires a token JWT to prove permission.\n\nThe JWT library's validation of the bindings in the Import Token incorrectly warned on mismatches, instead of outright rejecting the token.\n\nAs a result, any account can take an Import token used by any other account and re-use it for themselves because the binding to the importing account is not rejected, and use it to import *any* Subject from the Exporting account, not just the Subject referenced in the Import Token.\n\nThe NATS account-server system treats account JWTs as semi-public information, such that an attacker can easily enumerate all account JWTs and retrieve all Import Tokens from those account JWTs.\n\nThe CVE identifier should cover the JWT library repair and the nats-server containing the fixed JWT library, and any other application depending upon the fixed JWT library.\n\n\n## Affected versions\n\n#### JWT library\n\n * all versions prior to 2.0.1\n * fixed after nats-io/jwt#149 landed (2021-03-14)\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@423b79440c (2021-03-14)\n\n\n## Impact\n\nIn deployments with untrusted accounts able to update the Account Server with imports, a malicious account can access any Subject from an account which provides Exported Subjects.\n\nAbuse of this facility requires the malicious actor to upload their tampered Account JWT to the Account Server, providing the service operator with a data-store which can be scanned for signs of abuse.\n\n\n## Workaround\n\nDeny access to clients to update their account JWT in the account server.\n\n\n## Solution\n\nUpgrade the JWT dependency in any application using it.\n\nUpgrade the NATS server if using NATS Accounts (with private Exports; Account owners can create those at any time though).\n\nAudit all accounts JWTs to scan for exploit attempts; a Python script to audit the accounts can be found at .", "severity": [ { @@ -33,47 +33,13 @@ ] } ] - }, - { - "package": { - "ecosystem": "Go", - "name": "github.com/nats-io/jwt" - }, - "ranges": [ - { - "type": "ECOSYSTEM", - "events": [ - { - "introduced": "0" - }, - { - "fixed": "1.2.3-0.20210314221642-a826c77dc9d2" - } - ] - } - ] - }, - { - "package": { - "ecosystem": "Go", - "name": "github.com/nats-io/jwt/v2" - }, - "ranges": [ - { - "type": "ECOSYSTEM", - "events": [ - { - "introduced": "0" - }, - { - "fixed": "2.0.1" - } - ] - } - ] } ], "references": [ + { + "type": "WEB", + "url": "https://github.com/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c" + }, { "type": "WEB", "url": "https://github.com/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4" @@ -84,11 +50,15 @@ }, { "type": "WEB", - "url": "https://github.com/nats-io/jwt/pull/149" + "url": "https://github.com/nats-io/nats-server/commit/423b79440c80c863de9f4e20548504e6c5d5e403" }, { "type": "WEB", "url": "https://advisories.nats.io/CVE/CVE-2021-3127.txt" + }, + { + "type": "PACKAGE", + "url": "https://github.com/nats-io/nats-server" } ], "database_specific": { diff --git a/advisories/github-reviewed/2022/02/GHSA-62mh-w5cv-p88c/GHSA-62mh-w5cv-p88c.json b/advisories/github-reviewed/2022/02/GHSA-62mh-w5cv-p88c/GHSA-62mh-w5cv-p88c.json index df682492a7a..30b72e95263 100644 --- a/advisories/github-reviewed/2022/02/GHSA-62mh-w5cv-p88c/GHSA-62mh-w5cv-p88c.json +++ b/advisories/github-reviewed/2022/02/GHSA-62mh-w5cv-p88c/GHSA-62mh-w5cv-p88c.json @@ -1,10 +1,10 @@ { "schema_version": "1.4.0", "id": "GHSA-62mh-w5cv-p88c", - "modified": "2023-08-29T22:06:59Z", + "modified": "2024-05-21T15:22:54Z", "published": "2022-02-15T00:42:28Z", "aliases": [ - + "CVE-2021-3127" ], "summary": "nats-io/jwt not enforcing checking of Import token permissions", "details": "(This advisory is canonically )\n\n## Problem Description\n\nThe NATS server provides for Subjects which are namespaced by Account; all Subjects are supposed to be private to an account, with an Export/Import system used to grant cross-account access to some Subjects. Some Exports are public, such that anyone can import the\nrelevant subjects, and some Exports are private, such that the Import requires a token JWT to prove permission.\n\nThe JWT library's validation of the bindings in the Import Token incorrectly warned on mismatches, instead of outright rejecting the token.\n\nAs a result, any account can take an Import token used by any other account and re-use it for themselves because the binding to the\nimporting account is not rejected, and use it to import *any* Subject from the Exporting account, not just the Subject referenced in the Import Token.\n\nThe NATS account-server system treats account JWTs as semi-public information, such that an attacker can easily enumerate all account JWTs and retrieve all Import Tokens from those account JWTs.\n\nThe CVE identifier should cover the JWT library repair and the nats-server containing the fixed JWT library, and any other application depending upon the fixed JWT library.\n\n\n## Affected versions\n\n#### JWT library\n\n * all versions prior to 2.0.1\n * fixed after nats-io/jwt#149 landed (2021-03-14)\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@423b79440c (2021-03-14)\n\n\n## Impact\n\nIn deployments with untrusted accounts able to update the Account Server with imports, a malicious account can access any Subject from an account which provides Exported Subjects.\n\nAbuse of this facility requires the malicious actor to upload their tampered Account JWT to the Account Server, providing the service operator with a data-store which can be scanned for signs of abuse.\n\n\n## Workaround\n\nDeny access to clients to update their account JWT in the account server.\n\n\n## Solution\n\nUpgrade the JWT dependency in any application using it.\n\nUpgrade the NATS server if using NATS Accounts (with private Exports; Account owners can create those at any time though).\n\nAudit all accounts JWTs to scan for exploit attempts; a Python script to audit the accounts can be found at .", @@ -25,7 +25,7 @@ "introduced": "0" }, { - "fixed": "2.0.1" + "last_affected": "1.2.2" } ] } @@ -56,10 +56,18 @@ "type": "WEB", "url": "https://github.com/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c" }, + { + "type": "WEB", + "url": "https://github.com/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4" + }, { "type": "WEB", "url": "https://github.com/nats-io/jwt/pull/149" }, + { + "type": "WEB", + "url": "https://github.com/nats-io/jwt/commit/6c72fdd73e82fa9ebb151d84773baf4e9164c4ab" + }, { "type": "WEB", "url": "https://advisories.nats.io/CVE/CVE-2021-3127.txt"