HistoryEditJSON (OSV)

RUSTSEC-2020-0166

personnummer Input validation error

Reported
Issued
Package
personnummer (crates.io)
Type
INFO Notice
Aliases
References
Patched
  • >=3.0.1

Description

Swedish personal identity is in the form of YYMMDD-XXXX

An issue arises from the regular expression allowing the first three digits in the last four digits of the personnummer to be 000, which is invalid.

To mitigate this without upgrading, a check on the last four digits can be made to make sure it's not 000x.

The affected version should not be relied on without the mitigation to check that the swedish personal identity number is valid.

Advisory available under CC0-1.0 license.