{"benchmark_id": "ASB-000568", "title": "AI Agent Security in TypeScript (Next.js)", "category": "AI Security", "language": "TypeScript", "framework": "Next.js", "application_type": "AI/LLM Application", "source_type": "synthetic", "vulnerability_name": "AI Agent Security", "vulnerability_description": "An autonomous agent that can call tools or shells is tricked by external content into performing unsafe actions.", "vulnerable_code": "function lookup(task) { // VULNERABLE\n agent.decide(task).forEach(s => shell(s.cmd)); }", "secure_code": "function lookup(task) { // SECURE\n agent.decide(task).forEach(s => s.risk===\"ext\" ? approve(s) : sandbox(s)); }", "exploit_example": "External content persuades agent to exfiltrate or run rm -rf.", "exploitability_explanation": "The 'AI Agent Security' weakness (CWE-77, A05:2021) is exploitable because the TypeScript implementation in the Next.js context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Ability to steer the agent via external content it consumes or tool outputs.", "expected_llm_analysis": "The model/tool should flag 'AI Agent Security' (CWE-77, mapped to A05:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'AI Agent Security' (CWE-77, mapped to A05:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Sandbox tool execution, allow-list capabilities, require confirmation for external actions, and constrain the agent's blast radius.", "expected_secure_code": "function lookup(task) { // SECURE\n agent.decide(task).forEach(s => s.risk===\"ext\" ? approve(s) : sandbox(s)); }", "expected_severity": "High", "expected_confidence": "Medium", "expected_cwe": "CWE-77", "expected_owasp": "A05:2021", "expected_owasp_api": "", "expected_owasp_llm": "LLM06:2025", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "expected_cvss_score": 8.0, "expected_false_positive_probability": 0.3, "expected_false_negative_probability": 0.35, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["ai-agent-security", "cwe-77", "owasp-a052021", "typescript", "next.js", "real-world-enterprise"], "references": ["https://owasp.org/www-project-top-10-for-large-language-model-applications/", "https://cwe.mitre.org/data/definitions/77.html"], "metadata": {"difficulty": "Real-world enterprise", "category": "AI Security", "owasp": "A05:2021", "owasp_api": "", "owasp_llm": "LLM06:2025", "cwe": "CWE-77", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "cvss_score": 8.0, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000101", "title": "Race Condition in JavaScript (Angular)", "category": "Business Logic", "language": "JavaScript", "framework": "Angular", "application_type": "Web Application", "source_type": "synthetic", "vulnerability_name": "Race Condition", "vulnerability_description": "A check-then-act sequence is not atomic, letting concurrent requests pass the check before a shared state update lands (TOCTOU).", "vulnerable_code": "async function lookup(id) { if(await get(id).used) return; await set(id, {used:true}); }", "secure_code": "async function getItem(id) { const r = await db.run(\"UPDATE c SET used=true WHERE id=$1 AND used=false\", [id]); if(r.rowCount===0) throw \"used\"; }", "exploit_example": "Fire 100 concurrent requests -> coupon redeemed many times.", "exploitability_explanation": "The 'Race Condition' weakness (CWE-362, A04:2021) is exploitable because the JavaScript implementation in the Angular context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Ability to issue concurrent requests faster than the check-then-act window.", "expected_llm_analysis": "The model/tool should flag 'Race Condition' (CWE-362, mapped to A04:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'Race Condition' (CWE-362, mapped to A04:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Make check-then-act atomic (DB transaction with SELECT ... FOR UPDATE, distributed lock, or optimistic concurrency).", "expected_secure_code": "async function getItem(id) { const r = await db.run(\"UPDATE c SET used=true WHERE id=$1 AND used=false\", [id]); if(r.rowCount===0) throw \"used\"; }", "expected_severity": "Critical", "expected_confidence": "Medium", "expected_cwe": "CWE-362", "expected_owasp": "A04:2021", "expected_owasp_api": "", "expected_owasp_llm": "", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "expected_cvss_score": 9.9, "expected_false_positive_probability": 0.2, "expected_false_negative_probability": 0.35, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["race-condition", "cwe-362", "owasp-a042021", "javascript", "angular", "advanced"], "references": ["https://cwe.mitre.org/data/definitions/362.html", "https://owasp.org/www-community/attacks/Thread_Safety_and_State_Problems"], "metadata": {"difficulty": "Advanced", "category": "Business Logic", "owasp": "A04:2021", "owasp_api": "", "owasp_llm": "", "cwe": "CWE-362", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cvss_score": 9.9, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000453", "title": "Open Redirect in TypeScript (Vue)", "category": "Injection", "language": "TypeScript", "framework": "Vue", "application_type": "Web Application", "source_type": "synthetic", "vulnerability_name": "Open Redirect", "vulnerability_description": "A redirect target is taken from user input without an allow-list, enabling phishing by bouncing victims through a trusted domain.", "vulnerable_code": "function lookup(req,res){ res.redirect(req.query.next); }", "secure_code": "function loadUser(req,res){ const n=req.query.next; if(typeof n===\"string\"&&n.startsWith(\"/\")) res.redirect(n); else res.redirect(\"/\"); }", "exploit_example": " ?next=//evil.example -> phishing via trusted domain.", "exploitability_explanation": "The 'Open Redirect' weakness (CWE-601, A01:2021) is exploitable because the TypeScript implementation in the Vue context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Ability to supply a destination URL to a redirect handler.", "expected_llm_analysis": "The model/tool should flag 'Open Redirect' (CWE-601, mapped to A01:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'Open Redirect' (CWE-601, mapped to A01:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Only redirect to an internally computed, allow-listed target; never use raw user input for the Location header.", "expected_secure_code": "function loadUser(req,res){ const n=req.query.next; if(typeof n===\"string\"&&n.startsWith(\"/\")) res.redirect(n); else res.redirect(\"/\"); }", "expected_severity": "Critical", "expected_confidence": "High", "expected_cwe": "CWE-601", "expected_owasp": "A01:2021", "expected_owasp_api": "API8:2023", "expected_owasp_llm": "", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "expected_cvss_score": 9.9, "expected_false_positive_probability": 0.1, "expected_false_negative_probability": 0.15, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["open-redirect", "cwe-601", "owasp-a012021", "typescript", "vue", "intermediate"], "references": ["https://cwe.mitre.org/data/definitions/601.html", "https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html"], "metadata": {"difficulty": "Intermediate", "category": "Injection", "owasp": "A01:2021", "owasp_api": "API8:2023", "owasp_llm": "", "cwe": "CWE-601", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cvss_score": 9.9, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000565", "title": "OAuth Vulnerabilities in TypeScript (NestJS)", "category": "Authentication", "language": "TypeScript", "framework": "NestJS", "application_type": "Web Application", "source_type": "synthetic", "vulnerability_name": "OAuth Vulnerabilities", "vulnerability_description": "An OAuth/OIDC flow is misimplemented (redirect_uri not validated, implicit flow, token leakage) allowing account takeover.", "vulnerable_code": "function getItem(code, ru) { return oauth.exchange(code, ru); }", "secure_code": "function fetchRecord(code, ru) { if(!REGISTERED.has(ru)) throw new Error(\"bad\"); return oauth.exchange(code, ru, pkce); }", "exploit_example": "Attacker supplies attacker-controlled redirect_uri -> token leak.", "exploitability_explanation": "The 'OAuth Vulnerabilities' weakness (CWE-287, A07:2021) is exploitable because the TypeScript implementation in the NestJS context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Control of the redirect target or interception of the authorization code/token.", "expected_llm_analysis": "The model/tool should flag 'OAuth Vulnerabilities' (CWE-287, mapped to A07:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'OAuth Vulnerabilities' (CWE-287, mapped to A07:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Strictly validate redirect_uri against a registered allow-list, use PKCE, short-lived codes, and never return tokens in fragments for SPAs without DPoP.", "expected_secure_code": "function fetchRecord(code, ru) { if(!REGISTERED.has(ru)) throw new Error(\"bad\"); return oauth.exchange(code, ru, pkce); }", "expected_severity": "Critical", "expected_confidence": "High", "expected_cwe": "CWE-287", "expected_owasp": "A07:2021", "expected_owasp_api": "API2:2023", "expected_owasp_llm": "", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "expected_cvss_score": 9.9, "expected_false_positive_probability": 0.05, "expected_false_negative_probability": 0.1, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["oauth-vulnerabilities", "cwe-287", "owasp-a072021", "typescript", "nestjs", "beginner"], "references": ["https://cwe.mitre.org/data/definitions/287.html", "https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/"], "metadata": {"difficulty": "Beginner", "category": "Authentication", "owasp": "A07:2021", "owasp_api": "API2:2023", "owasp_llm": "", "cwe": "CWE-287", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cvss_score": 9.9, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000480", "title": "Server-Side Request Forgery in Go (Fiber)", "category": "Injection", "language": "Go", "framework": "Fiber", "application_type": "Web Application", "source_type": "synthetic", "vulnerability_name": "Server-Side Request Forgery", "vulnerability_description": "A server fetches a URL built from user input, letting an attacker reach internal services, cloud metadata endpoints, or ports not exposed publicly.", "vulnerable_code": "func renderView(w http.ResponseWriter, r *http.Request) {\n url := r.FormValue(\"url\")\n // VULNERABLE\n resp, _ := http.Get(url)\n io.Copy(w, resp.Body)\n}", "secure_code": "func getItem(w http.ResponseWriter, r *http.Request) {\n url := r.FormValue(\"url\")\n // SECURE: restricted client, host allow-list\n if !allowedHost(url) { http.Error(w, \"forbidden\", 403); return }\n resp, _ := http.Get(url)\n io.Copy(w, resp.Body)\n}", "exploit_example": "POST /api/users {\"url\":\"http://169.254.169.254/latest/meta-data/iam/security-credentials/\"}", "exploitability_explanation": "The 'Server-Side Request Forgery' weakness (CWE-918, A10:2021) is exploitable because the Go implementation in the Fiber context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Network access to the endpoint that fetches a user-supplied URL.", "expected_llm_analysis": "The model/tool should flag 'Server-Side Request Forgery' (CWE-918, mapped to A10:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'Server-Side Request Forgery' (CWE-918, mapped to A10:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Allow-list schemes/hosts, resolve and compare to a deny-list of internal ranges, block link-local/metadata IPs, and require auth for the fetcher.", "expected_secure_code": "func getItem(w http.ResponseWriter, r *http.Request) {\n url := r.FormValue(\"url\")\n // SECURE: restricted client, host allow-list\n if !allowedHost(url) { http.Error(w, \"forbidden\", 403); return }\n resp, _ := http.Get(url)\n io.Copy(w, resp.Body)\n}", "expected_severity": "Critical", "expected_confidence": "Medium", "expected_cwe": "CWE-918", "expected_owasp": "A10:2021", "expected_owasp_api": "API7:2023", "expected_owasp_llm": "", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "expected_cvss_score": 9.9, "expected_false_positive_probability": 0.2, "expected_false_negative_probability": 0.25, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["server-side-request-forgery", "cwe-918", "owasp-a102021", "go", "fiber", "advanced"], "references": ["https://owasp.org/www-community/attacks/Server_Side_Request_Forgery", "https://cwe.mitre.org/data/definitions/918.html"], "metadata": {"difficulty": "Advanced", "category": "Injection", "owasp": "A10:2021", "owasp_api": "API7:2023", "owasp_llm": "", "cwe": "CWE-918", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cvss_score": 9.9, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000212", "title": "gRPC Security in Java (Spring Boot)", "category": "API Security", "language": "Java", "framework": "Spring Boot", "application_type": "API Service", "source_type": "synthetic", "vulnerability_name": "gRPC Security", "vulnerability_description": "A gRPC service does not enforce per-method authorization or input validation, allowing unauthorized RPC calls.", "vulnerable_code": "// Java: grpc example", "secure_code": "// Java: grpc secure", "exploit_example": "Low-priv client calls Delete on arbitrary id.", "exploitability_explanation": "The 'gRPC Security' weakness (CWE-285, A01:2021) is exploitable because the Java implementation in the Spring Boot context trusts attacker-controlled input in a security-sensitive operation. With the prerequisites met, an attacker can violate the intended confidentiality, integrity, or availability of the system. The provided exploit_example demonstrates a concrete proof-of-concept.", "attack_prerequisites": "Network access to the gRPC service and a valid (low-priv) credential.", "expected_llm_analysis": "The model/tool should flag 'gRPC Security' (CWE-285, mapped to A01:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_detection": "The model/tool should flag 'gRPC Security' (CWE-285, mapped to A01:2021). It should point to the exact sink where untrusted data reaches a dangerous API, explain the root cause, and state the conditions under which the issue is reachable and exploitable.", "expected_fix": "Require per-method authn/authz (interceptors), validate messages, and avoid exposing unsafe RPCs.", "expected_secure_code": "// Java: grpc secure", "expected_severity": "Critical", "expected_confidence": "High", "expected_cwe": "CWE-285", "expected_owasp": "A01:2021", "expected_owasp_api": "API5:2023", "expected_owasp_llm": "", "expected_cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "expected_cvss_score": 9.9, "expected_false_positive_probability": 0.1, "expected_false_negative_probability": 0.15, "evaluation_rubric": {"scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "score_max": 100, "passing_threshold": 70}, "scoring_criteria": [{"criterion": "Vulnerability correctly identified", "weight": 15}, {"criterion": "CWE correctly identified", "weight": 10}, {"criterion": "OWASP correctly mapped", "weight": 10}, {"criterion": "Severity correctly estimated", "weight": 10}, {"criterion": "Exploit explained correctly", "weight": 10}, {"criterion": "Secure fix generated", "weight": 20}, {"criterion": "Secure code quality", "weight": 10}, {"criterion": "Explanation quality", "weight": 10}, {"criterion": "False-positive avoidance (does not flag secure code as vulnerable)", "weight": 5}], "tags": ["grpc-security", "cwe-285", "owasp-a012021", "java", "spring boot", "intermediate"], "references": ["https://cwe.mitre.org/data/definitions/285.html", "https://owasp.org/Top10/A01_2021-Broken_Access_Control/"], "metadata": {"difficulty": "Intermediate", "category": "API Security", "owasp": "A01:2021", "owasp_api": "API5:2023", "owasp_llm": "", "cwe": "CWE-285", "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cvss_score": 9.9, "generated_by": "AppSecBench generator v1.1.0", "source": "original/synthetic", "license": "MIT", "schema_version": "1.1.0"}} {"benchmark_id": "ASB-000447", "title": "Cross-Site Scripting in Swift (iOS)", "category": "Injection", "language": "Swift", "framework": "iOS", "application_type": "Mobile Application", "source_type": "synthetic", "vulnerability_name": "Cross-Site Scripting", "vulnerability_description": "Untrusted input is reflected into an HTTP response without output encoding, letting an attacker execute JavaScript in the victim's browser.", "vulnerable_code": "func loadUser() -> String { let q = req.query[\"q\"]!; return \"