Skip to content

fix: DOM XSS via Search Parameter - Multiple Payload Vectors - #46

Draft
MBK-fr wants to merge 1 commit into
mainfrom
darkmoon/fix-dom-xss-via-search-parameter-multiple-payload-ve-959dd9
Draft

MBK-fr wants to merge 1 commit into
mainfrom
darkmoon/fix-dom-xss-via-search-parameter-multiple-payload-ve-959dd9

Conversation

@MBK-fr

@MBK-fr MBK-fr commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Finding

Severity: high | Category: xss_stored
Endpoint: http://172.19.0.3:8080/#/search?q=

The search-result component wrapped user input with DomSanitizer.bypassSecurityTrustHtml, enabling DOM/reflected XSS via the search query and product descriptions.

Fix

Removes the bypassSecurityTrustHtml calls so Angular's built-in contextual output encoding applies.

Files changed:

  • frontend/src/app/search-result/search-result.component.ts

Validation intent

Manual verification that the documented exploit path no longer succeeds, plus the project's existing test suite. This PR is intended for human review and is never auto-merged.

Why this is a draft

Template bindings may need to move from [innerHTML] to interpolation for full coverage and type consistency; opened as draft pending a frontend review and build.


AI-assistance disclosure: this remediation was generated with AI assistance (Darkmoon remediation agent) and requires human code review before merge. No overclaim is intended.
Darkmoon finding reference: vuln_959dd9.

Remediation for Darkmoon finding vuln_959dd9 (xss_stored, high).
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