CVE-2026-35040
Nearform Fast-Jwt ≤ 6.2.1
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LSummary
CVE-2026-35040 is a medium-severity Expected Behavior Violation (CWE-440) vulnerability in Nearform Fast-Jwt. Its CVSS base score is 5.3 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Obfuscated Files or Information (T1027); ranked at the 31th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-6 (Security and Privacy Function Verification) — see the control section below for these in your framework.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-20898
Vulnerability Data
fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.1, using certain modifiers on RegExp objects in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options in verify functions can cause certain unintended behaviours. This is because some modifiers are…
more
stateful and will cause failures in every second verification attempt regardless of the validity of the token provided. Such modifiers are /g (global matching) and /y (sticky matching). This does NOT allow invalid tokens to be accepted, only for valid tokens to be improperly rejected in some configurations. Instead it causes 50% of valid authentication requests to fail in an alternating pattern. This vulnerability is fixed in 6.2.1.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and evaluation directly checks whether implemented functions match their specifications.
Security function verification confirms that functions operate according to their defined expected behavior.
A reference monitor must be small and correct, structurally limiting the chance of flawed comparison logic in authorization decisions.
Requiring a documented security architecture and design reduces the chance that implementation deviates from intended behavior.
Security engineering principles require correct implementation of comparison logic used for access and authentication decisions.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly enforce specification compliance and catch expected-behavior violations during development.
Security testing and exercises help discover behavior deviations before deployment.
Vulnerability identification can surface spec-violating flaws, while eliminating the weakness reduces some vulnerability backlog.
Routine software maintenance and patching can remediate discovered specification violations.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing in development and acceptance validates that functions behave as specified.
Secure development life cycle mandates verification against specifications, directly reducing expected-behavior violations.
Application security requirements explicitly define expected behavior that must be met.
Secure architecture principles can require robust comparison mechanisms for access decisions.
Secure coding practices enforce adherence to functional specifications during implementation.
Change management can catch specification deviations introduced by modifications.