Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

MWPW-192736: Add check for milolibs query param#1325

Merged
Ruchika4 merged 1 commit into
adobecom:stagefrom
zagi25:MWPW-192736-dc
Apr 27, 2026
Merged

MWPW-192736: Add check for milolibs query param#1325
Ruchika4 merged 1 commit into
adobecom:stagefrom
zagi25:MWPW-192736-dc

Conversation

@zagi25
Copy link
Copy Markdown
Collaborator

@zagi25 zagi25 commented Apr 17, 2026

Whitelist branch parameter with /^[a-zA-Z0-9_-]+$/; throw on any other characters.

Ticket

https://jira.corp.adobe.com/browse/MWPW-192736

Test URLs

Before: https://stage--dc--adobecom.aem.page/
After: https://MWPW-192736-dc--da-dc--zagi25.aem.page/


This PR was generated by Claude (Anthropic's Claude Code CLI).

… XSS

The milolibs and unitylibs query params were interpolated directly into
template literals used for dynamic import()s, letting an attacker point
module loading at an arbitrary origin and execute JS in the page context.

Add a strict whitelist (^[a-zA-Z0-9_-]+$) and throw on invalid input in
head.html, acrobat/scripts/utils.js, acrobat/scripts/scripts.js, and
acrobat/blocks/unity/unity.js.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 17, 2026

Page Scores Audits Google
📱 / Lighthouse returned error: NOT_HTML. The page provided is not HTML (served as MIME type text/plain). PSI
🖥️ / Lighthouse returned error: NOT_HTML. The page provided is not HTML (served as MIME type text/plain). PSI

@zagi25 zagi25 changed the title MWPW-192736: validate milolibs/unitylibs branch params to prevent DOM XSS MWPW-192736: Add check for milolibs query param Apr 17, 2026
@Ruchika4 Ruchika4 merged commit d6eb4fb into adobecom:stage Apr 27, 2026
12 of 16 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants