Skip to content

fix: the constructmarkup function directly interpola... in... - #374

Open
anupamme wants to merge 1 commit into
prebid:masterfrom
anupamme:fix-repo-prebid-universal-creative-v-001-src-mobileandamprender-js
Open

fix: the constructmarkup function directly interpola... in...#374
anupamme wants to merge 1 commit into
prebid:masterfrom
anupamme:fix-repo-prebid-universal-creative-v-001-src-mobileandamprender-js

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Fix high severity security issue in src/mobileAndAmpRender.js.

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File src/mobileAndAmpRender.js:95
Assessment Likely exploitable
Chain Complexity 2-step

Description: The constructMarkup function directly interpolates the 'ad' parameter (creative HTML/JavaScript from bid response) into a template string without sanitization, allowing arbitrary script injection. The 'ad' variable comes from bidObject.adm which can contain malicious JavaScript that executes in the parent page context.

Evidence

Exploitation scenario: Attacker controlling bid response injects malicious script tag in 'adm' field: {"adm": "<script>alert('XSS')</script>"}.

Scanner confirmation: multi_agent_ai rule V-001 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Threat Model Context

This is a Node.js library - vulnerabilities affect downstream consumers who use this package.

Changes

  • src/mobileAndAmpRender.js

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


Automated security fix by OrbisAI Security

The constructMarkup function directly interpolates the 'ad' parameter (creative HTML/JavaScript from bid response) into a template string without sanitization, allowing arbitrary script injection
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