Vulnerabilities in pkg:npm/hapi-auth-jwt2

PACKAGE
Advisory Identifier: GHSA-mg8r-9g6j-hwv9
Advisory Summary

CVE-2016-10525 is a CRITICAL (CVSS 9.8) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Hapi auth jwt2 libraries in the npm ecosystem. The issue involves authentication bypass in hapi-auth-jwt2. Remediation is available by upgrading affected packages to version 5.1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/hapi-auth-jwt2

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-mg8r-9g6j-hwv9 CVE-2016-10525 CRITICAL Authentication Bypass in hapi-auth-jwt2

CVE-2016-10525 at a Glance

CVE Identifier CVE-2016-10525
GHSA Identifier GHSA-mg8r-9g6j-hwv9
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-287: Improper Authentication
Affected Product Hapi auth jwt2
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2016-10525

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

hapi-auth-jwt2 fixed: 5.1.2
npm install hapi-auth-jwt2@5.1.2
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 hapi-auth-jwt2

How to Check if You Are Affected

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

npm ls hapi-auth-jwt2

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

Note: The npm ls hapi-auth-jwt2 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Hapi auth jwt2, 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

Versions of `hapi-auth-jwt2` prior to version 5.1.2 are affected by a complete authentication bypass vulnerability when in the `try` authentication mode. ## Recommendation Update to version 5.1.2 or later.

CVE-2016-10525 Affected Hapi auth jwt2 Versions

1 component(s)
Fixed Versions:
5.1.2
Product / Package Ecosystem Affected Versions Fixed Version
hapi-auth-jwt2
npm
≥ 5.1.1
< 5.1.2
All 1 versions
5.1.1
5.1.2

References

Frequently Asked Questions

What is CVE-2016-10525?
CVE-2016-10525 is a security vulnerability in Hapi auth jwt2 involving Authentication Bypass in hapi-auth-jwt2 under CWE-287: Improper Authentication.
Which Hapi auth jwt2 versions are affected?
Affected versions include releases prior to 5.1.2 across affected packages: hapi-auth-jwt2.
What version fixes CVE-2016-10525?
Upgrading to 5.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hapi-auth-jwt2 affected?
Yes, hapi-auth-jwt2 is affected in releases prior to 5.1.2. Upgrade your dependency to 5.1.2 or later.
What is the CVSS score of CVE-2016-10525?
CVE-2016-10525 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-10525?
CVE-2016-10525 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2016-10525?
Run the dependency tree command: 'npm ls hapi-auth-jwt2'. 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-mg8r-9g6j-hwv9",
  "modified" : "2021-09-15T18:58:17Z",
  "published" : "2019-02-18T23:39:00Z",
  "aliases" : [ "CVE-2016-10525" ],
  "summary" : "Authentication Bypass in hapi-auth-jwt2",
  "details" : "Versions of `hapi-auth-jwt2` prior to version 5.1.2 are affected by a complete authentication bypass vulnerability when in the `try` authentication mode. \n\n\n## Recommendation\n\nUpdate to version 5.1.2 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "hapi-auth-jwt2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1.1"
      }, {
        "fixed" : "5.1.2"
      } ]
    } ],
    "versions" : [ "5.1.1" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10525"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dwyl/hapi-auth-jwt2/issues/111"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dwyl/hapi-auth-jwt2/pull/112"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-mg8r-9g6j-hwv9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dwyl/hapi-auth-jwt2"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/81"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:46:04Z",
    "nvd_published_at" : null
  }
}