onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

2 reflected XSS #844

Open floyd-fuh opened 1 week ago

floyd-fuh commented 1 week ago

You have two trivial reflected Cross-Site Scripting (XSS) issues that might have an impact or not, as I didn't test an attack vector/exploitability, e.g. I don't know if there is a trivial link-click exploit path (I simply didn't try because I don't even have this plugin installed anywhere). Nevertheless, I suggest you fix them:

https://github.com/onOffice-Web-Org/oo-wp-plugin/blob/45e3373226e18346c5770f47e74a717472f7c160/plugin/Gui/AdminPageFormSettingsBase.php#L764

onoffice-for-wp-websites/plugin/Gui/AdminPageFormSettingsBase.php:762:          echo '<input type="hidden" name="record_id" value="' . ( $_GET['id'] ?? 0 ) . '" />';

and

https://github.com/onOffice-Web-Org/oo-wp-plugin/blob/45e3373226e18346c5770f47e74a717472f7c160/plugin/Gui/AdminPageSettingsBase.php#L176

onoffice-for-wp-websites/plugin/Gui/AdminPageSettingsBase.php:170:              echo '<input type="hidden" name="record_id" value="' . ( $_GET['id'] ?? 0 ) . '" />';

Obviously if the URL GET parameter id is something like ?id="><script>alert(1)</script> this will trigger the alert.

Again, I didn't test it, there might be a hundred code paths that verify the id parameter to be numeric before this code is trigger - or not, I didn't check.

As far as I saw you know what HTML output encoding is and means, so this should be trivial to fix.

yeneastgate commented 6 days ago

@fredericalpers I will check and fix it asap

yeneastgate commented 3 days ago

@fredericalpers @floyd-fuh I have listed and checked the files that may have XSS and SQL Injection vulnerabilities in the table below, and I have updated the locations where XSS security errors may occur. image

Please check and let me know your opinion. Thanks!

fredericalpers commented 3 days ago

Thank you for fixing this, we will review this asap.

floyd-fuh commented 2 days ago

looks ok to me