Cross-site Scripting (XSS) - Stored in craigk5n/webcalendar

Valid

Reported on

Oct 1st 2021


Description

Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into websites. An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script.

https://github.com/craigk5n/webcalendar/ is vulnerable to XSS as shown below:

Impact

Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page.

Occurrences

Snippet:

 $settings['db_password']      = getPostValue( 'form_db_password' );

Variable: $settings['db_password'] Go to: http://localhost/webcalendar-master/install/index.php In step 2, Insert in the Password field:

password*/ echo $_SERVER[PHP_SELF]; /*

Clic in Test Settings Visit in a browser:

http://localhost/webcalendar-master/includes/settings.php/%3Cscript%3Ealert%60xss%60%3C/script%3E

Observe phpinfo is executed

Z-Old
2 years ago

Admin


Hey hitisec, I've emailed the maintainers for you.

We have contacted a member of the craigk5n/webcalendar team and are waiting to hear back 2 years ago
Craig Knudsen validated this vulnerability 2 years ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
Craig Knudsen
2 years ago

Maintainer


Notes:

  • edit_user_handler.php has been removed from the upcoming release. However, there were corresponding issues with the replacement code which will be resolved.
  • the issues with install/index.php may be fixed later, but do not seem like a pressing issue. It assumes the admin user would put XSS into the db password when installing or upgrading
hitisec
2 years ago

Researcher


Thanks for your response

Craig Knudsen
a year ago

Maintainer


Just fixed the XSS in adding/editing users which still existing in v1.9.0 code with commit 38c32f73002ea965cac34f48806f1fb57a4b475a

Jamie Slome
a year ago

Admin


@craigk5n - if possible, can you confirm the fix for this report?

Craig Knudsen marked this as fixed in v1.9.1 with commit 38c32f a year ago
Craig Knudsen has been awarded the fix bounty
This vulnerability will not receive a CVE
index.php#L745-L754 has been validated
to join this conversation