Rule Definition
ASCSM-CWE-079, OWASP A3
Remediation
Make sure to use "srcdoc" only in combination with the Iframe Sandbox. Otherwise, XSS attacks might slip through existing filters rules as the payload can be HTML encoded.
Violation Code Sample
<iframe srcdoc="<img src=x:x onerror=alert(1)>" />
Fixed Code Sample
<iframe sandbox srcdoc="<img src=x:x onerror=alert(1)>" />
Reference
https://html5sec.org/#139
Related Technologies
Technical Criterion
CWE-79 - Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.