diff --git a/.appsec-tests/CVE-2025-54782/CVE-2025-54782.yaml b/.appsec-tests/CVE-2025-54782/CVE-2025-54782.yaml new file mode 100644 index 00000000000..9d02378fcae --- /dev/null +++ b/.appsec-tests/CVE-2025-54782/CVE-2025-54782.yaml @@ -0,0 +1,21 @@ +## autogenerated on 2025-09-01 14:55:22 +id: CVE-2025-54782 +info: + name: CVE-2025-54782 + author: crowdsec + severity: info + description: CVE-2025-54782 testing + tags: appsec-testing +http: + - raw: + - | + POST /inspector/graph/interact HTTP/1.1 + Host: {{Hostname}} + Content-Type: text/plain + + {"code":"(function(){try{propertyIsEnumerable.call()}catch(pp){pp.constructor.constructor('return process')().mainModule.require('child_process').execSync('id')}})()"} + cookie-reuse: true + matchers: + - type: status + status: + - 403 diff --git a/.appsec-tests/CVE-2025-54782/config.yaml b/.appsec-tests/CVE-2025-54782/config.yaml new file mode 100644 index 00000000000..3830d0dc854 --- /dev/null +++ b/.appsec-tests/CVE-2025-54782/config.yaml @@ -0,0 +1,5 @@ +## autogenerated on 2025-09-01 14:55:22 +appsec-rules: + - ./appsec-rules/crowdsecurity/base-config.yaml + - ./appsec-rules/crowdsecurity/vpatch-CVE-2025-54782.yaml +nuclei_template: CVE-2025-54782.yaml diff --git a/appsec-rules/crowdsecurity/CVE-2025-54782.yaml b/appsec-rules/crowdsecurity/CVE-2025-54782.yaml new file mode 100644 index 00000000000..99642243943 --- /dev/null +++ b/appsec-rules/crowdsecurity/CVE-2025-54782.yaml @@ -0,0 +1,31 @@ +## autogenerated on 2025-09-01 14:55:22 +name: crowdsecurity/vpatch-CVE-2025-54782 +description: 'Detects RCE in NestJS DevTools Integration via unsafe code execution in /inspector/graph/interact endpoint.' +rules: + - and: + - zones: + - URI + transform: + - lowercase + match: + type: equals + value: /inspector/graph/interact + - zones: + - RAW_BODY + transform: + - lowercase + match: + type: contains + value: '"code":' + +labels: + type: exploit + service: http + confidence: 3 + spoofable: 0 + behavior: 'http:exploit' + label: 'NestJS DevTools - RCE' + classification: + - cve.CVE-2025-54782 + - attack.T1190 + - cwe.CWE-77 diff --git a/collections/crowdsecurity/appsec-virtual-patching.yaml b/collections/crowdsecurity/appsec-virtual-patching.yaml index be69426f031..7c908b06d9e 100644 --- a/collections/crowdsecurity/appsec-virtual-patching.yaml +++ b/collections/crowdsecurity/appsec-virtual-patching.yaml @@ -90,6 +90,7 @@ appsec-rules: - crowdsecurity/vpatch-CVE-2024-27292 - crowdsecurity/vpatch-CVE-2025-24893 - crowdsecurity/vpatch-CVE-2021-43798 +- crowdsecurity/CVE-2025-54782 author: crowdsecurity contexts: - crowdsecurity/appsec_base