Security Advisories (1)
CVE-2026-13048 (2026-08-13)

Data::MuForm::Localizer versions through 0.05 for Perl execute Perl from a message catalog header, reached at an arbitrary path because load_lexicon interpolates the language attribute into the catalog filename. load_lexicon builds the catalog path by appending `Messages/$lang.po` to the directory holding Localizer.pm, where $lang is the language attribute, with no check that it names a bare locale tag. A value holding `../` segments walks out of the message directory, so any readable path with a `.po` suffix is loaded. While parsing the catalog, extract_header_msgstr takes the `Plural-Forms:` header, prefixes `$` to the bare words nplurals, plural and n, and passes the rest verbatim into a string that is evaluated: the nplurals form evaluates the header expression immediately, and the plural_code form compiles it into a subroutine whose body runs when a plural message is localized. A header of `nplurals=2; plural=(system('...'),0);` therefore runs that command as the catalog loads. The evaluation inherits strict, so an expression that assigns to an undeclared variable fails to compile, while one built from calls alone does not. An application that sets the language attribute from request data, an Accept-Language header or a locale parameter, and an attacker who can place a file with a `.po` suffix and chosen contents at a readable path, together give code execution as the application user. The message expansion path is not affected: expand_named substitutes only the placeholder names the caller supplies, and _mangle_value returns the value unchanged.

NAME

Data::MuForm::Field::Date - a date field with formats

VERSION

version 0.05

SUMMARY

This field may be used with the jQuery Datepicker plugin.

You can specify the format for the date using jQuery formatDate strings or DateTime strftime formats. (Default format is format => '%Y-%m-%d'.)

d  - "%e" - day of month (no leading zero)
dd - "%d" - day of month (two digit)
o  - "%{day_of_year}" - day of the year (no leading zeros)
oo - "%j" - day of the year (three digit)
D  - "%a" - day name short
DD - "%A" - day name long
m  - "%{day_of_month}" - month of year (no leading zero)
mm - "%m" - month of year (two digit) "%m"
M  - "%b" - month name short
MM - "%B" - month name long
y  - "%y" - year (two digit)
yy - "%Y" - year (four digit)
@  - "%s" - Unix timestamp (ms since 01/01/1970)

For example:

has_field 'start_date' => ( type => 'Date', format => "dd/mm/y" );

or

has_field 'start_date' => ( type => 'Date', format => "%d/%m/%y" );

You can also set 'date_end' and 'date_start' attributes for validation of the date range. Use iso_8601 formats for these dates ("yyyy-mm-dd");

has_field 'start_date' => ( type => 'Date', date_start => "2009-12-25" );

Customize error messages 'date_early' and 'date_late':

has_field 'start_date' => ( type => 'Date,
    messages => { date_early => 'Pick a later date',
                  date_late  => 'Pick an earlier date', } );

Using with HTML5

If the field's form has its 'is_html5' flag active, then the field's rendering behavior changes in two ways:

  • It will render as <input type="date" ... /> instead of type="text".

  • If the field's format is set to anything other than ISO date format (%Y-%m-%d), then attempting to render the field will result in a warning.

    (Note that the default value for the field's format attribute is, in fact, the ISO date format.)

AUTHOR

Gerda Shank

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Gerda Shank.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.