This is a summary of the AI-generated 10-question deep analysis. The full version (longer answers, follow-up Q&A, related CVEs) requires login. Read the full analysis β
Q1What is this vulnerability? (Essence + Consequences)
π¨ **Essence**: A flaw in `fast-jwt` allows bypassing the `^` anchor in `publicKeyPemMatcher` via leading spaces in the key string.β¦
π‘οΈ **Root Cause**: Improper input validation in the PEM key matcher regex. π **Flaw**: The `^` anchor is bypassed by prepending spaces to the public key string.β¦
π’ **Vendor**: Nearform. π¦ **Product**: fast-jwt (JSON Web Token implementation). π **Affected Versions**: Version 6.1.0 and all prior versions.
Q4What can hackers do? (Privileges/Data)
π **Attack**: JWT Algorithm Confusion. π **Impact**: Attackers can forge tokens or bypass authentication. π **Severity**: High Confidentiality (C:H) and High Integrity (I:H) impact. No direct Availability (A:N) loss.
Q5Is exploitation threshold high? (Auth/Config)
β‘ **Threshold**: Low. π **Network**: Network Accessible (AV:N). π **Auth**: No Privileges Required (PR:N). π€ **User**: No User Interaction Needed (UI:N). π **Complexity**: Low (AC:L).
Q6Is there a public Exp? (PoC/Wild Exploitation)
π **Public Exploit**: No specific PoC provided in the data. π **Source**: Advisory confirmed via GitHub Security Advisories (GHSA-mvf2-f6gm-w987). β οΈ **Risk**: Theoretical but highly likely given the low complexity.
Q7How to self-check? (Features/Scanning)
π **Check**: Scan for `fast-jwt` library usage in Node.js projects. π **Version**: Verify if version is β€ 6.1.0. π **Code**: Look for custom PEM key handling that might allow leading whitespace injection.
Q8Is it fixed officially? (Patch/Mitigation)
π οΈ **Fix**: Upgrade `fast-jwt` to a version > 6.1.0. π’ **Official**: Patch released via Nearform GitHub Security Advisories. β **Status**: Confirmed fix available.
Q9What if no patch? (Workaround)
π§ **Workaround**: If upgrading isn't possible, strictly sanitize public key inputs to remove leading/trailing whitespace before passing to the JWT library.β¦