Miggo Logo

GHSA-vpgc-7h78-gx8f: personnummer/js vulnerable to Improper Input Validation

N/A

CVSS Score

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
9/4/2020
Updated
1/12/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
personnummernpm< 3.1.03.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T*is vuln*r**ility w*s r*port** to t** p*rsonnumm*r t**m in Jun* ****. T** slow r*spons* w*s *u* to lo*k** own*rs*ip o* som* o* t** *****t** p**k***s, w*i** **us** **l*ys to up**t* p**k***s prior to *is*losur*. T** vuln*r**ility is **t*rmin** to **

Reasoning

T** vuln*r**ility st*ms *rom improp*r input v*li**tion in t** r**ul*r *xpr*ssion us** *or p*rsonnumm*r v*li**tion. T** *or* `v*li**tion` *un*tion (lik*ly n*m** 'v*li*' in t** `P*rsonnumm*r` *l*ss/mo*ul*) *ont*in** * r***x p*tt*rn t**t p*rmitt** '***'