CVE-2023-45152 (published 2023-10-17T00:15Z)

Engelsystem is a shift planning system for chaos events. A Blind SSRF in the "Import schedule" functionality makes it possible to perform a port scan against the local environment. This vulnerability has been fixed in commit ee7d30b33. If a patch cannot be deployed, operators should ensure that no HTTP(s) services listen on localhost and/or systems only reachable from the host running the engelsystem software. If such services are necessary, they should utilize additional authentication.

CVSS v3 base score: 2.3, LOW (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N)

Weakness information:
cwe_id: CWE-918
cwe_name: Server-Side Request Forgery (SSRF)
description: The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
extended_description: By providing URLs to unexpected hosts or ports, attackers can make it appear that the server is sending the request, possibly bypassing access controls such as firewalls that prevent the attackers from accessing the URLs directly. The server can be used as a proxy to conduct port scanning of hosts in internal networks, use other URLs such as that can access documents on the system (using file://), or use other protocols such as gopher:// or tftp://, which may provide greater control over the contents of requests.
         

Fix information:
repo_url: https://github.com/engelsystem/engelsystem
commit_details: repo_url: https://github.com/engelsystem/engelsystem
author: Igor Scheller
author_date: 2023-09-17 13:25:11+02:00
msg: Schedule import: Show error message on schedule parsing errors
repository: repo_url: https://github.com/engelsystem/engelsystem
repo_name: engelsystem/engelsystem
description: Shift planning system for chaos events.
repo_language: PHP
owner: engelsystem
file_changes: filename: XmlParser.php
change_type: ModificationType.MODIFY
diff: @@ -15,8 +15,7 @@ class XmlParser
 
     public function load(string $xml): bool
     {
-        $scheduleXML = simplexml_load_string($xml);
-
+        $scheduleXML = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOWARNING | LIBXML_NOERROR);
         if (!$scheduleXML) {
             return false;
         }

programming_language: PHP
filename: schedule-invalid.html
change_type: ModificationType.ADD
diff: @@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="">
+<head>
+    <title>I'm HTML!</title>
+</head>
+<body>
+This is not a schedule<br>
+and thus must be ignored.
+</body>
+</html>

programming_language: HTML
filename: XmlParserTest.php
change_type: ModificationType.MODIFY
diff: @@ -23,12 +23,13 @@ class XmlParserTest extends TestCase
      */
     public function testLoad(): void
     {
-        libxml_use_internal_errors(true);
-
         $parser = new XmlParser();
 
         // Invalid XML
         $this->assertFalse($parser->load('foo'));
+        // Invalid schedule
+        $this->assertFalse($parser->load(file_get_contents(__DIR__ . '/Assets/schedule-invalid.html')));
+
         // Minimal import
         $this->assertTrue($parser->load(file_get_contents(__DIR__ . '/Assets/schedule-minimal.xml')));
         // Basic import

programming_language: PHP