LiveActive security incident?Get immediate response
CVE Record

CVE-2023-48238: JWT Algorithm Confusion in json-web-token library

joaquimserafim/json-web-token is a javascript library use to interact with JSON Web Tokens (JWT) which are a compact URL-safe means of representing claims to be transferred between two parties. Versions prior to 4.0.0 are vulnerable to a JWT algorithm confusion attack. On line 86 of the 'index.js' file, the algorithm to use for verifying the signature of the JWT token is taken from the JWT token, which at that point is still unverified and thus shouldn't be trusted. To exploit this vulnerability, an attacker needs to craft a malicious JWT token containing the HS256 algorithm, signed with the public RSA key of the victim application. This attack will only work against this library is the RS256 algorithm is in use, however it is a best practice to use that algorithm. Version 4.0.0 fixes the issue.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2023-48238 affects the joaquimserafim/json-web-token JavaScript library before 4.0.0. A flaw in JWT signature verification can let an attacker forge trusted tokens in certain RS256 deployments. For businesses, the main concern is unauthorized access or privilege misuse in applications relying on this library for authentication or authorization.

Executive priority

Treat as a high-priority application dependency issue where this library protects user identity, sessions, or API access. Patch during the next urgent remediation window, sooner for internet-facing or sensitive systems using RS256 JWTs.

Technical view

The library selected the verification algorithm from an untrusted JWT header before verification. In RS256 use cases, this enables JWT algorithm confusion: a token declaring HS256 may be accepted if signed using the application’s public RSA key as an HMAC secret. Version 4.0.0 fixes the issue. CVSS is 7.5, with high integrity impact.

Likely exposure

Exposure is limited to applications using joaquimserafim/json-web-token versions earlier than 4.0.0, especially where RS256 is used for JWT verification. Systems not using this package, or already on 4.0.0 or later, are not indicated as affected by the provided sources.

Exploitation context

The advisory describes a network-reachable, unauthenticated attack requiring a crafted JWT and knowledge of the victim application’s public RSA key. CISA KEV status is false in the provided data, and no cited source states active exploitation.

Researcher notes

The issue maps to CWE-345 and centers on trusting the unverified token header to choose the verification algorithm. Evidence supports affected versions below 4.0.0 and a fixed release at 4.0.0. No public exploit status is established by the provided sources.

Mitigation direction

  • Upgrade joaquimserafim/json-web-token to version 4.0.0 or later.
  • Review vendor advisory and commit for implementation details.
  • Prioritize applications using JWTs for authentication or authorization.
  • Check transitive dependencies and lockfiles for affected versions.

Validation and detection

  • Inventory applications using the json-web-token package.
  • Confirm installed package versions are 4.0.0 or later.
  • Identify services verifying JWTs with RS256.
  • Review dependency manifests and lockfiles for older versions.
  • Confirm authentication tests pass after updating.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-345: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2023-48238 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
2ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N3.93.6GitHub_M

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2023-48238Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CVECVE Program Container
CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
joaquimserafimjson-web-token< 4.0.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-345 · source CWE mapping

Insufficient Verification of Data Authenticity

Insufficient Verification of Data Authenticity represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.