{"schemaVersion":3,"id":"CVE-2021-3127","aliases":["UBUNTU-CVE-2021-3127","DEBIAN-CVE-2021-3127","CGA-2pjv-449p-rcwf","CGA-59fw-v64c-mfcq","CGA-rp25-fc89-c3v5","CGA-xxv9-c886-gg48","GHSA-62mh-w5cv-p88c","BIT-nats-2021-3127","GHSA-9r5x-fjv3-q6h4","GHSA-j756-f273-xhp4","GO-2022-0386"],"status":"published","duplicateOf":null,"title":null,"description":"NATS Server 2.x before 2.2.0 and JWT library before 2.0.1 have Incorrect Access Control because Import Token bindings are mishandled.","dates":{"published":"2021-03-16T19:55:10.000Z","modified":"2024-08-03T16:45:51.265Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01448,"percentile":0.72943,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01448},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01448,"percentile":0.72943}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01448,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01448,"percentile":0.72943}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_C3C6F9C945AD5BE3","name":"Exploit Reference (advisories.nats.io)","source":"reference","url":"https://advisories.nats.io/CVE/CVE-2021-3127.txt","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions","description":"The product does not handle or incorrectly handles an exceptional condition.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/755.html"}],"affected":[{"vendor":"chainguard","product":"nats-server","name":"nats-server","label":"nats-server","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/nats-server","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"nats-server-compat","name":"nats-server-compat","label":"nats-server-compat","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/nats-server-compat","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"nats-server","name":"nats-server","label":"nats-server","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/nats-server","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"nats-server-compat","name":"nats-server-compat","label":"nats-server-compat","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/nats-server-compat","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"debian","product":"golang-github-nats-io-jwt","name":"golang-github-nats-io-jwt","label":"golang-github-nats-io-jwt","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/golang-github-nats-io-jwt","purlType":"deb","versions":[{"text":"< 2.2.0-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"golang-github-nats-io-jwt","name":"golang-github-nats-io-jwt","label":"golang-github-nats-io-jwt","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/golang-github-nats-io-jwt","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"github.com/nats-io","product":"jwt","name":"github.com/nats-io/jwt","label":"jwt","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/nats-io/jwt","purlType":"golang","versions":[{"text":"≤ 1.2.2","noFixRecorded":false,"fixedIn":null},{"text":"< 1.2.3-0.20210314221642-a826c77dc9d2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 1.2.2 | < 1.2.3-0.20210314221642-a826c77dc9d2","eol":null,"hubHref":null},{"vendor":"github.com/nats-io/jwt","product":"v2","name":"github.com/nats-io/jwt/v2","label":"v2","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/nats-io/jwt/v2","purlType":"golang","versions":[{"text":"< 2.0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.0.1","eol":null,"hubHref":null},{"vendor":"github.com/nats-io/nats-server","product":"v2","name":"github.com/nats-io/nats-server/v2","label":"v2","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/nats-io/nats-server/v2","purlType":"golang","versions":[{"text":"< 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.2.0","eol":null,"hubHref":null},{"vendor":"linuxfoundation","product":"nats-server","name":"nats-server","label":"nats-server","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 2.0.0, < 2.2.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 2.0.0, < 2.2.0","eol":null,"hubHref":"/vendor/linuxfoundation/nats-server"},{"vendor":"nats","product":"jwt_library","name":"jwt library","label":"jwt_library","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 2.0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.0.1","eol":null,"hubHref":"/vendor/nats/jwt_library"}],"affectedCount":11,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://advisories.nats.io/CVE/CVE-2021-3127.txt","label":"advisories.nats.io/CVE/CVE-2021-3127.txt","hostname":"advisories.nats.io","tags":["X Refsource MISC","REPORT","EVIDENCE","WEB","Advisory","Exploit","Vendor Advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-3127","label":"ubuntu.com/security/CVE-2021-3127","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2021/03/16/1","label":"www.openwall.com/lists/oss-security/2021/03/16/1","hostname":"www.openwall.com","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2021/03/16/1/2","label":"www.openwall.com/lists/oss-security/2021/03/16/1/2","hostname":"www.openwall.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-3127","label":"www.cve.org/CVERecord?id=CVE-2021-3127","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://github.com/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c","label":"github.com/nats-io/jwt/security/advisories/GHSA-62mh-w5cv-p88c","hostname":"github.com","tags":["REPORT","WEB"]},{"url":"https://github.com/nats-io/jwt/pull/149","label":"github.com/nats-io/jwt/pull/149","hostname":"github.com","tags":["REPORT","WEB","FIX"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-3127","label":"security-tracker.debian.org/tracker/CVE-2021-3127","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4","label":"github.com/nats-io/nats-server/security/advisories/GHSA-j756-f273-xhp4","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nats-io/jwt/commit/6c72fdd73e82fa9ebb151d84773baf4e9164c4ab","label":"github.com/nats-io/jwt/commit/6c72fdd73e82fa9ebb151d84773baf4e9164c4ab","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nats-io/jwt","label":"github.com/nats-io/jwt","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3127","label":"nvd.nist.gov/vuln/detail/CVE-2021-3127","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/nats-io/jwt/pull/149/commits/a826c77dc9d2671c961b75ceefdb439c41029866","label":"github.com/nats-io/jwt/pull/149/commits/a826c77dc9d2671c961b75ceefdb439c41029866","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nats-io/nats-server/commit/423b79440c80c863de9f4e20548504e6c5d5e403","label":"github.com/nats-io/nats-server/commit/423b79440c80c863de9f4e20548504e6c5d5e403","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/nats-io/nats-server","label":"github.com/nats-io/nats-server","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-3XWF-56GH-QXQQ","CGA-WG3J-593X-7XRC"]},"timeline":[{"kind":"published","date":"2021-03-16T19:55:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T16:45:51.265Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":40,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T07:50:01.978Z","stale":false,"partial":false}}