Summary
@tensei/auth, from tenseijs, uses a hard-coded JWT signing key when JWT_SECRET is not set, allowing user impersonation. The CVSS 4.0 score is 9.3 (critical).
What happened
According to the description, @tensei/auth falls back to a hard-coded JWT signing key ('auth-secret-key') when the JWT_SECRET environment variable is unset. An unauthenticated attacker can sign tokens carrying arbitrary user ids, which are accepted by populateContextFromToken, and thereby impersonate any user, including administrators. The weakness is classified as CWE-1394.
Why it matters
Impersonating any user, including administrators, implies high impact on confidentiality, integrity and availability according to the CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N), with a score of 9.3 assigned by VulnCheck as CNA. Exploitation requires neither authentication nor user interaction. CISA's KEV catalog does not list active exploitation, and the source provides no evidence that this is a zero-day.
Affected products and versions
@tensei/auth (npm ecosystem, vendor tenseijs): versions <= 0.11.5.
| Product | Versions | Fixed in |
|---|---|---|
| tenseijs @tensei/auth | <= 0.11.5 | — |
Action recommended by the source
The source does not state a fixed version or a specific mitigation. Available references include the project issue (https://github.com/tenseijs/tensei/issues/398) and the VulnCheck advisory (https://www.vulncheck.com/advisories/tensei-through-0.11.5-authentication-bypass-via-hard-coded-jwt-secret-in-tensei-auth).
Sources and references
- https://github.com/tenseijs/tensei/issues/398 — CVE Program
- https://github.com/tenseijs/tensei/blob/630f39038c7751178465f990fb358b0c2d5b1914/packages/auth/src/index.ts#L94-L98 — CVE Program
- https://github.com/tenseijs/tensei — CVE Program
- https://www.vulncheck.com/advisories/tensei-through-0.11.5-authentication-bypass-via-hard-coded-jwt-secret-in-tensei-auth — CVE Program
Weaknesses (CWE): CWE-1394
Relevant change history
Published
Advisory published.