Skip to content

fix: restrict numeric date fields to ASCII digits CVE-2026-60074 - #54

Open
robrwo wants to merge 1 commit into
SBECK-github:masterfrom
robrwo:CVE-2026-60074
Open

fix: restrict numeric date fields to ASCII digits CVE-2026-60074#54
robrwo wants to merge 1 commit into
SBECK-github:masterfrom
robrwo:CVE-2026-60074

Conversation

@robrwo

@robrwo robrwo commented Aug 20, 2026

Copy link
Copy Markdown

The parse regexes capture year, month and day with the \d shorthand, which on a character string matches the whole Unicode decimal digit property \p{Nd} and not just [0-9]. Date::Manip::Base::check validates the captured fields with numeric comparisons alone, and _parse_check stores the numified fields, so a field whose leading characters are ASCII digits numifies to an in-range prefix and satisfies every test. With U+0664 ARABIC-INDIC DIGIT FOUR as the final character of the year, ParseDate("202\x{664}-03-08") returns 0202030800:00:00; a non-ASCII digit in the month or day field shifts those fields the same way ("2026-1\x{662}-08" returns January, "2026-03-1\x{665}" returns the 1st), and one in a fractional minute field drops the fraction.

The parse regexes capture year, month and day with the \d shorthand,
which on a character string matches the whole Unicode decimal digit
property \p{Nd} and not just [0-9].  Date::Manip::Base::check validates
the captured fields with numeric comparisons alone, and _parse_check
stores the numified fields, so a field whose leading characters are
ASCII digits numifies to an in-range prefix and satisfies every test.
With U+0664 ARABIC-INDIC DIGIT FOUR as the final character of the year,
ParseDate("202\x{664}-03-08") returns 0202030800:00:00; a non-ASCII
digit in the month or day field shifts those fields the same way
("2026-1\x{662}-08" returns January, "2026-03-1\x{665}" returns the
1st), and one in a fractional minute field drops the fraction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant