CVE-2016-10525: Authentication Bypass in hapi-auth-jwt2

hapi-auth-jwt2 Updated 02 Oct 2025

Summary

18/02/2019
Yes i
Critical
9.8

CVE-2016-10525: Authentication Bypass in hapi-auth-jwt2. Affects hapi-auth-jwt2 versions >= 5.1.1, < 5.1.2. Fixed in 5.1.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The hapi-auth-jwt2 package is an npm package used for authentication in hapi.js applications. It provides JSON Web Token (JWT) authentication strategies for securing routes. The package allows developers to implement authentication using JWT tokens, which are commonly used for stateless authentication in web applications. However, versions prior to 5.1.2 of hapi-auth-jwt2 are affected by a critical vulnerability that allows complete authentication bypass when in the try authentication mode.

Vulnerability Detail

The vulnerability in hapi-auth-jwt2 arises from a flaw in the try authentication mode. This mode allows the authentication strategy to be used as a fallback when other strategies fail. However, due to a coding error, the try mode in affected versions of hapi-auth-jwt2 does not properly handle authentication failures, resulting in an authentication bypass. An attacker can exploit this vulnerability to gain unauthorized access to protected resources without a valid JWT token. This can lead to unauthorized data access, privilege escalation, and other security breaches.

How To Fix

Minimum fixed version

5.1.2

This is the first release that contains the fix.

npm install hapi-auth-jwt2@5.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The hapi-auth-jwt2 package prior to version 5.1.2 is affected by a critical authentication bypass vulnerability. It is crucial to update to version 5.1.2 or later to mitigate the risk of unauthorized access and potential security breaches. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for hapi-auth-jwt2 →

Share this vulnerability

FAQ

The vulnerability allows an attacker to bypass authentication and gain unauthorized access to protected resources. This can lead to data breaches, privilege escalation, and other security issues.

Versions prior to 5.1.2 of hapi-auth-jwt2 are affected by this vulnerability.

No, the recommended solution is to update to version 5.1.2 or later of hapi-auth-jwt2.

There are no known exploits for this vulnerability at this time.

How To Fix

Minimum fixed version

5.1.2

This is the first release that contains the fix.

npm install hapi-auth-jwt2@5.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback