CVE-2023-3552 (published 2023-07-08T09:15Z)

Improper Encoding or Escaping of Output in GitHub repository nilsteampassnet/teampass prior to 3.0.10.

CVSS v3 base score: 5.4, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)

Weakness information:
cwe_id: CWE-116
cwe_name: Improper Encoding or Escaping of Output
description: The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
extended_description: 
            Improper encoding or escaping can allow attackers to change the commands that are sent to another component, inserting malicious commands instead.
            Most products follow a certain protocol that uses structured messages for communication between components, such as queries or commands. These structured messages can contain raw data interspersed with metadata or control information. For example, "GET /index.html HTTP/1.1" is a structured message containing a command ("GET") with a single argument ("/index.html") and metadata about which protocol version is being used ("HTTP/1.1").
            If an application uses attacker-supplied inputs to construct a structured message without properly encoding or escaping, then the attacker could insert special characters that will cause the data to be interpreted as control information or metadata. Consequently, the component that receives the output will perform the wrong operations, or otherwise interpret the data incorrectly.
         
         

Fix information:
repo_url: https://github.com/nilsteampassnet/teampass
commit_details: repo_url: https://github.com/nilsteampassnet/teampass
author: nilsteampassnet
author_date: 2023-07-08 10:17:10+02:00
msg: 3.0.10

Fix possible xss in folder page
repository: repo_url: https://github.com/nilsteampassnet/teampass
repo_name: nilsteampassnet/TeamPass
description: Collaborative Passwords Manager
repo_language: PHP
owner: nilsteampassnet
file_changes: filename: functions.js
change_type: ModificationType.MODIFY
diff: @@ -397,22 +397,26 @@ function simplePurifier(
     bSvgFilters = false
 ) 
 {
-    return DOMPurify.sanitize(
-        sanitizeDom(text)
-            .replaceAll('&lt;', '<')
-            .replaceAll('&#x3C;', '<')
-            .replaceAll('&#60;', '<')
-            .replaceAll('&gt;', '>')
-            .replaceAll('&#x3E;', '>')
-            .replaceAll('&#62;', '>')
-            .replaceAll('&amp;', '&')
-            .replaceAll('&#38;', '&')
-            .replaceAll('&#x26;', '&')
-            .replaceAll('&quot;', '"')
-            .replaceAll('&#34;;', '"')
-            .replaceAll('&#x22;', '"')
-            .replaceAll('&#39;', "'"),
-        {USE_PROFILES: {html:bHtml, svg:bSvg, svgFilters: bSvgFilters}}
+    return sanitizeDom(
+        DOMPurify.sanitize(
+            text
+                .replaceAll('&lt;', '<')
+                .replaceAll('&#x3C;', '<')
+                .replaceAll('&#x3c;', '<')
+                .replaceAll('&#60;', '<')
+                .replaceAll('&gt;', '>')
+                .replaceAll('&#x3E;', '>')
+                .replaceAll('&#x3e;', '>')
+                .replaceAll('&#62;', '>')
+                .replaceAll('&amp;', '&')
+                .replaceAll('&#38;', '&')
+                .replaceAll('&#x26;', '&')
+                .replaceAll('&quot;', '"')
+                .replaceAll('&#34;;', '"')
+                .replaceAll('&#x22;', '"')
+                .replaceAll('&#39;', "'"),
+            {USE_PROFILES: {html:bHtml, svg:bSvg, svgFilters: bSvgFilters}}
+        )
     );
 }
 

programming_language: JavaScript
filename: folders.js.php
change_type: ModificationType.MODIFY
diff: @@ -117,6 +117,7 @@ if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'folders', $SETTINGS) ===
                 'iconSelected': purifyRes.arrFields['iconSelected'],
             }
             console.log(data)
+            return false;
             // Launch action
             $.post(
                 'sources/folders.queries.php', {

programming_language: PHP