Skip to content

fix(localize): validate locale in getOutputPathFn to prevent path traversal#67913

Open
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:i18n
Open

fix(localize): validate locale in getOutputPathFn to prevent path traversal#67913
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:i18n

Conversation

@alan-agius4
Copy link
Copy Markdown
Contributor

The localize-translate CLI tool uses the locale field from translation files to expand the {{LOCALE}} placeholder in the output directory. It failed to sanitize locale input, allowing malicious translations to write files outside of the configured output directory.

This change mitigates this issue by combining.

Closes #67906

…versal

The `localize-translate` CLI tool uses the `locale` field from translation files to expand the `{{LOCALE}}` placeholder in the output directory. It failed to sanitize `locale` input, allowing malicious translations to write files outside of the configured output directory.

This change mitigates this issue by combining.

Closes angular#67906
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Mar 27, 2026
@pullapprove pullapprove bot requested a review from atscott March 27, 2026 13:44
@angular-robot angular-robot bot added the area: i18n Issues related to localization and internationalization label Mar 27, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 27, 2026
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: i18n Issues related to localization and internationalization target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Path Traversal in @angular/localize Translation Output via Malicious Locale Field

2 participants