GHSA-vpgc-7h78-gx8f: personnummer/js vulnerable to Improper Input Validation
N/A
CVSS Score
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
-
Published
9/4/2020
Updated
1/12/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
-
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
personnummer | npm | < 3.1.0 | 3.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper input validation in the regular expression used for personnummer validation. The core validation
function (likely named 'valid' in the Personnummer
class/module) contained a regex pattern that permitted '000' in positions where valid personnummer values should be restricted. This matches the described vulnerability pattern of allowing 000x in the last four digits. As the workaround suggests adding a post-regex check for this pattern, it indicates the validation
logic itself (implemented in the main validation
function) was flawed.