CVE-2024-6087:
Lunary improper access control vulnerability
6.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.26032%
CWE
Published
9/13/2024
Updated
11/18/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
lunary | npm | < 1.4.9 | 1.4.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key issues:
- The password reset endpoint (/reset-password) in index.ts lacked validation of the JWT token's 'type' claim. This allowed any token with a valid email (including those from user invites) to trigger a password reset.
- The requestPasswordReset function in utils.ts generated tokens without a 'type' identifier. While not directly vulnerable, this design allowed cross-purpose token reuse when combined with the missing type check in the reset endpoint. The patch addressed both by adding a 'type' field to tokens and enforcing type validation in the reset flow, closing the access control gap.