◐ Shell
clean mode source ↗

[Backport 20.3.X] fix(core): avoid caching missing locale data by SkyZeroZx · Pull Request #69351 · angular/angular

Only cache locale data loaded from the global locale registry when an actual locale entry is found.

This prevents attacker-controlled missing locale identifiers from being retained indefinitely in SSR when locale lookup falls back to a parent locale or the built-in English locale, avoiding unbounded process memory growth in locale-aware pipes and formatters.

(cherry picked from commit ea8277a)

@SkyZeroZx SkyZeroZx changed the title fix(core): avoid caching missing locale data [Backport 20.3.X] fix(core): avoid caching missing locale data

Jun 14, 2026