other
- Location
workflow.json:26- Finding
Untrusted Webpage DOM Is Passed Directly to an AI Analyzer
- Content
View full analysis
Vulnerability Details
File Location:
workflow.json:26-45
Vulnerability Type: Indirect prompt injection
Risk Level: MediumVulnerable Code
json "extract": "dom" }, "output": { "dom": "${DOM_CONTENT}", "screenshot": "${PAGE_SCREENSHOT}", "title": "${PAGE_TITLE}", "links": "${PAGE_LINKS}" }, "description": "使用真实 Chromium 浏览器完整渲染页面(含 JS 执行),截图并提取完整 DOM 结构。捕获 Shadow DOM、懒加载内容、iframe 内内容。" }, { "order": 2, "name": "WCAG合规AI分析", "skill": "summarize", "input": { "source": "${DOM_CONTENT}", "mode": "wcag-analysis", "level": "${LEVEL:-AA}", "standard": "WCAG 2.1",Technical Analysis
The workflow extracts the complete DOM from an attacker-controlled target page and supplies it directly to the
summarizeAI component as its analysis source. No explicit trust boundary, content sanitization, prompt-injection defense, or instruction/data separation is configured before this transfer.Because the target website controls the DOM, it can embed natural-language instructions in visible elements, hidden elements, comments, Shadow DOM content, or iframe content. If the AI analyzer interprets these instructions as directives rather than as untrusted evidence, the page can influence the generated accessibility findings.
The available configuration does not establish that webpage content can invoke tools or execute commands. Therefore, the demonstrated risk concerns the integrity of the WCAG analysis and generated report rather than direct system compromise.
Attack Path
- An attacker creates or modifies a webpage containing prompt-like instructions designed to influence an AI analyzer.
- A user requests an accessibility audit of the malicious URL.
agent-browserloads the page, executes its JavaScript, and extracts the complete DOM, including attacker-controlled content.- The wor ...[truncated 952 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat all extracted DOM content as untrusted data and place it inside explicit, strongly delimited data sections.
- Add a higher-priority instruction stating that directives, requests, or policies found inside the target DOM must never be followed.
- Transform the DOM into a constrained accessibility-analysis representation rather than submitting unrestricted page text.
- Remove scripts, comments, metadata, hidden prompt-like content, and other elements that are unnecessary for the selected WCAG checks.
- Require the analyzer to return a schema-constrained result containing only expected finding fields, WCAG identifiers, evidence, severity, and remediation.
- Validate each reported issue against concrete DOM evidence before accepting it.
- Escape or sanitize all analyzer-generated text before passing it to
card-renderer. - Apply output length limits and reject unexpected instructions, markup, URLs, or fields in generated findings.
- Where practical, use deterministic accessibility tools for machine-verifiable checks and reserve the AI model for explanation and remediation guidance.
