CVE-2022-0387: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79)
value: Cross-site Scripting (XSS) - Stored in Packagist remdex/livehelperchat prior to 3.93v.
CWE description: The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVSS v3 base score: 5.4
Published: 2022-01-27T06:15Z
Repository: https://github.com/livehelperchat/livehelperchat
Language: PHP
Files changed: lhc_web/design/defaulttheme/tpl/lhdepartment/editgroup.tpl.php, lhc_web/design/defaulttheme/tpl/lhdepartment/editlimitgroup.tpl.php, lhc_web/design/defaulttheme/tpl/lhdepartment/newgroup.tpl.php
Commit date: 2022-01-27 00:17:29 -0500
Commit message: fix

Diff: diff --git a/lhc_web/design/defaulttheme/tpl/lhdepartment/editgroup.tpl.php b/lhc_web/design/defaulttheme/tpl/lhdepartment/editgroup.tpl.php
index e3ac924071d..48bd94649f7 100644
--- a/lhc_web/design/defaulttheme/tpl/lhdepartment/editgroup.tpl.php
+++ b/lhc_web/design/defaulttheme/tpl/lhdepartment/editgroup.tpl.php
@@ -1,6 +1,6 @@
-<h1><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
+<h1 ng-non-bindable><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
 
 <?php if (isset($errors)) : ?>
 	<?php include(erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php'));?>
 <?php endif; ?>
 
diff --git a/lhc_web/design/defaulttheme/tpl/lhdepartment/editlimitgroup.tpl.php b/lhc_web/design/defaulttheme/tpl/lhdepartment/editlimitgroup.tpl.php
index 613b24c3f19..3943f7a9e13 100644
--- a/lhc_web/design/defaulttheme/tpl/lhdepartment/editlimitgroup.tpl.php
+++ b/lhc_web/design/defaulttheme/tpl/lhdepartment/editlimitgroup.tpl.php
@@ -1,6 +1,6 @@
-<h1><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department limit group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
+<h1 ng-non-bindable><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department limit group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
 
 <?php if (isset($errors)) : ?>
 	<?php include(erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php'));?>
 <?php endif; ?>
 
diff --git a/lhc_web/design/defaulttheme/tpl/lhdepartment/newgroup.tpl.php b/lhc_web/design/defaulttheme/tpl/lhdepartment/newgroup.tpl.php
index 4d5b5050400..4df8a06a452 100644
--- a/lhc_web/design/defaulttheme/tpl/lhdepartment/newgroup.tpl.php
+++ b/lhc_web/design/defaulttheme/tpl/lhdepartment/newgroup.tpl.php
@@ -2,11 +2,11 @@
 
 <?php if (isset($errors)) : ?>
 	<?php include(erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php'));?>
 <?php endif; ?>
 
-<form action="<?php echo erLhcoreClassDesign::baseurl('department/newgroup')?>" method="post">
+<form action="<?php echo erLhcoreClassDesign::baseurl('department/newgroup')?>" method="post" ng-non-bindable>
 
     <?php include(erLhcoreClassDesign::designtpl('lhkernel/csfr_token.tpl.php'));?>
 
 	<?php include(erLhcoreClassDesign::designtpl('lhdepartment/formgroup.tpl.php'));?>
 	

Vulnerable code: <h1><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
<h1><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department limit group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
<form action="<?php echo erLhcoreClassDesign::baseurl('department/newgroup')?>" method="post">
Fixed code: <h1 ng-non-bindable><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
<h1 ng-non-bindable><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('department/edit','Edit department limit group');?> - <?php echo htmlspecialchars($departament_group->name)?></h1>
<form action="<?php echo erLhcoreClassDesign::baseurl('department/newgroup')?>" method="post" ng-non-bindable>