mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
48 lines (47 loc) • 1.3 kB
YAML
rules:
- id: xml2json-xxe
message: >-
If unverified user data can reach the XML Parser it can result in XML External or
Internal Entity (XXE) Processing vulnerabilities
metadata:
owasp:
- A04:2017 - XML External Entities (XXE)
- A05:2021 - Security Misconfiguration
cwe:
- 'CWE-611: Improper Restriction of XML External Entity Reference'
asvs:
section: V5 Validation, Sanitization and Encoding
control_id: 5.5.2 Insecue XML Deserialization
control_url: https://github.com/OWASP/ASVS/blob/master/4.0/en/0x13-V5-Validation-Sanitization-Encoding.md#v55-deserialization-prevention
version: '4'
category: security
technology:
- xml2json
cwe2022-top25: true
cwe2021-top25: true
subcategory:
- audit
likelihood: LOW
impact: LOW
confidence: LOW
references:
- https://owasp.org/Top10/A05_2021-Security_Misconfiguration
languages:
- javascript
- typescript
severity: WARNING
patterns:
- pattern: |
var $XML = require('xml2json');
...
$XML.toJson(...);
- pattern-not: |
var $XML = require('xml2json');
...
$XML.toJson("...",...);
- pattern-not: |-
var $XML = require('xml2json');
...
var $S = "...";
...
$XML.toJson($S,...);