Vulnerabilities in pkg:npm/angular-jwt

PACKAGE
Advisory Identifier: GHSA-vm2p-f5j4-mj6g
Advisory Summary

CVE-2018-11537 is a MODERATE (CVSS 6.5) auth0 angular-jwt misinterprets allowlist as vulnerability (CWE-20: Improper Input Validation) affecting Angular jwt libraries in the npm ecosystem. The issue involves auth0 angular-jwt misinterprets allowlist as regex. Remediation is available by upgrading affected packages to version 0.1.10.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/angular-jwt

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/angular-jwt. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-vm2p-f5j4-mj6g CVE-2018-11537 MODERATE Auth0 angular-jwt misinterprets allowlist as regex

CVE-2018-11537 at a Glance

CVE Identifier CVE-2018-11537
GHSA Identifier GHSA-vm2p-f5j4-mj6g
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Angular jwt
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2018-11537

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

angular-jwt fixed: 0.1.10
npm install angular-jwt@0.1.10
Verify Direct and Transitive Dependencies

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

npm ls angular-jwt

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2018-11537, inspect your project dependencies using npm:

npm ls angular-jwt

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

Note: The npm ls angular-jwt command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Angular jwt, 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

Auth0 angular-jwt before 0.1.10 treats whiteListedDomains entries as regular expressions, which allows remote attackers with knowledge of the `jwtInterceptorProvider.whiteListedDomains` setting to bypass the domain allowlist filter via a crafted domain. For example, if the setting is initialized with: `jwtInterceptorProvider.whiteListedDomains = ['whitelisted.Example.com'];` An attacker can set up a domain `whitelistedXexample.com` that will pass the allow list filter, as it considers the `.` separator to be a regex whildcard which matches any character.

CVE-2018-11537 Affected Angular jwt Versions

1 component(s)
Fixed Versions:
0.1.10
Product / Package Ecosystem Affected Versions Fixed Version
angular-jwt
npm
< 0.1.10
0.1.10

References

Frequently Asked Questions

What is CVE-2018-11537?
CVE-2018-11537 is a security vulnerability in Angular jwt involving Auth0 angular-jwt misinterprets allowlist as regex under CWE-20: Improper Input Validation.
Which Angular jwt versions are affected?
Affected versions include releases prior to 0.1.10 across affected packages: angular-jwt.
What version fixes CVE-2018-11537?
Upgrading to 0.1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is angular-jwt affected?
Yes, angular-jwt is affected in releases prior to 0.1.10. Upgrade your dependency to 0.1.10 or later.
What is the CVSS score of CVE-2018-11537?
CVE-2018-11537 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-11537?
CVE-2018-11537 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for CVE-2018-11537?
Run the dependency tree command: 'npm ls angular-jwt'. 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-vm2p-f5j4-mj6g",
  "modified" : "2023-10-19T18:21:26Z",
  "published" : "2022-05-14T03:05:44Z",
  "aliases" : [ "CVE-2018-11537" ],
  "summary" : "Auth0 angular-jwt misinterprets allowlist as regex",
  "details" : "Auth0 angular-jwt before 0.1.10 treats whiteListedDomains entries as regular expressions, which allows remote attackers with knowledge of the `jwtInterceptorProvider.whiteListedDomains` setting to bypass the domain allowlist filter via a crafted domain.\n\n For example, if the setting is initialized with:\n\n`jwtInterceptorProvider.whiteListedDomains = ['whitelisted.Example.com'];`\n\nAn attacker can set up a domain `whitelistedXexample.com` that will pass the allow list filter, as it considers the `.` separator to be a regex whildcard which matches any character.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "angular-jwt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-11537"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/angular-jwt/pull/174"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/angular-jwt/commit/a4f03b49c3fb47cc6375c2a33b5ac11ca3c606f0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/angular-jwt/commit/e368cf124443507f1710f60ae855c4c54eebc6ea"
  }, {
    "type" : "WEB",
    "url" : "https://auth0.com/docs/security/bulletins/cve-2018-11537"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/auth0/angular-jwt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-19T18:21:26Z",
    "nvd_published_at" : "2018-06-19T19:29:00Z"
  }
}