Skip to content

Harden template trust and prototype mutation handling#5757

Open
M0nd0R wants to merge 1 commit into
Polymer:masterfrom
M0nd0R:agent/security-hardening
Open

Harden template trust and prototype mutation handling#5757
M0nd0R wants to merge 1 commit into
Polymer:masterfrom
M0nd0R:agent/security-hardening

Conversation

@M0nd0R

@M0nd0R M0nd0R commented Jul 15, 2026

Copy link
Copy Markdown

What changed

  • hardens template trust checks so only framework-created nested templates are accepted by html
  • blocks prototype-mutation paths in path.js and PropertyEffects public path APIs
  • routes legacy reflection helpers through sanitizeDOMValue
  • closes strict-template-policy bypasses involving dom-module assetpath/style/custom-style lookups
  • hardens stamped ID maps and global dom-module registries against __proto__ special-property mutation

Why

These flows allowed attacker-controlled markup or path input to bypass trust boundaries, reintroduce unsanitized DOM writes, or mutate framework-owned object prototypes.

Impact

This reduces exposure to template trust bypasses, strict-template-policy bypasses, legacy sanitizer bypasses, and prototype-pollution primitives in Polymer applications.

Validation

  • git diff --check
  • targeted jsdom repro and verification harnesses for the template trust, path mutation, sanitization, strict-template-policy, stamped ID map, and dom-module registry cases
  • full browser polymer test suite was not run here because this environment does not provide a local Chrome or Chromium binary

@M0nd0R
M0nd0R requested a review from kevinpschaaf as a code owner July 15, 2026 04:40
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