Advisory

RUSTSEC-2020-0166

Also known as: GHSA-28r9-pq4c-wp3c

Summary

personnummer Input validation error

Details

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.

Severity

Not rated by the source.

Dates

Published
2020-09-04 12:00 UTC
Modified
2023-11-08 04:13 UTC

Affected packages and fixes

personnummer

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 3.0.1 (semver)

Fixed versions

3.0.1

Fix

  • Fixed version 3.0.1
    cargo update -p personnummer --precise 3.0.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences