CVE-2021-4255 (published 2022-12-18T22:15Z)

A vulnerability was found in ctrlo lenio and classified as problematic. Affected by this issue is some unknown functionality of the file views/contractor.tt. The manipulation of the argument contractor.name leads to cross site scripting. The attack may be launched remotely. The name of the patch is e1646d5cd0a2fbab9eb505196dd2ca1c9e4cdd97. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-216212.

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

Weakness information:
cwe_id: CWE-707
cwe_name: Improper Neutralization
description: The product does not ensure or incorrectly ensures that structured messages or data are well-formed and that certain security properties are met before being read from an upstream component or sent to a downstream component.
extended_description: 
            If a message is malformed, it may cause the message to be incorrectly interpreted.
            Neutralization is an abstract term for any technique that ensures that input (and output) conforms with expectations and is "safe."  This can be done by:
	    
	      checking that the input/output is already "safe" (e.g. validation)
	      transformation of the input/output to be "safe" using techniques such as filtering, encoding/decoding, escaping/unescaping, quoting/unquoting, or canonicalization
	      preventing the input/output from being directly provided by an attacker (e.g. "indirect selection" that maps externally-provided values to internally-controlled values)
	      preventing the input/output from being processed at all
	    
            This weakness typically applies in cases where the product prepares a control message that another process must act on, such as a command or query, and malicious input that was intended as data, can enter the control plane instead. However, this weakness also applies to more general cases where there are not always control implications.
         
         

Fix information:
repo_url: https://github.com/ctrlo/lenio
commit_details: repo_url: https://github.com/ctrlo/lenio
author: Andy Beverley
author_date: 2021-02-08 20:13:02+00:00
msg: Fix more XSS issues
repository: repo_url: https://github.com/ctrlo/lenio
repo_name: ctrlo/lenio
description: Facilities management system
repo_language: Perl
owner: ctrlo
file_changes: filename: contractor.tt
change_type: ModificationType.MODIFY
diff: @@ -47,7 +47,7 @@
 	    [% FOR contractor IN contractors %]
 	    <tr>
 		<td class="col-sm-1"><a href="/contractor/[% contractor.id %]">[% contractor.id %]</a></td>
-		<td class="col-sm-10">[% contractor.name %]</td>
+		<td class="col-sm-10">[% contractor.name | html %]</td>
 	    </tr>
 	    [% END %]
 	</table> 

programming_language: HTML
filename: index.tt
change_type: ModificationType.MODIFY
diff: @@ -15,9 +15,9 @@
 
             [% FOR task IN tasks %]
                 <tr>
-                    <td>[% task.name %]
+                    <td>[% task.name | html %]
                     </td>
-                    <td>[% task.site.org.name %] ([% task.site.name %])</td>
+                    <td>[% task.site.org.name | html %] ([% task.site.name | html %])</td>
                     <td>
                         [% IF task.last_completed %]
                             <a href="/ticket/[% task.last_completed_id %]">[% task.last_completed.strftime(dateformat) %]</a>

programming_language: HTML