Skip to content

CSRF vulnerability on internal API

High
amousset published GHSA-48p8-g5qf-p49q Jul 11, 2023

Package

rudder-webapp (rudder)

Affected versions

< 6.2.16
>= 7.0.0, < 7.0.5
>= 7.1.0, < 7.1.3

Patched versions

6.2.16
7.0.5
7.1.3

Description

Impact

It is possible to make CSRF attacks against the internal API (used by client-side rendered pages) as the session cookie is not protected against usage from other origins. It may allow modifying the applied configuration.

Exploiting this requires making a Rudder user open a crafted page in a browser connected to a Rudder session. Making changes to the Rudder configuration requires a POST request, so the user needs to interact with the page to submit the crafted form.

Note: Server-side rendered forms are protected by a supplementary anti-CSRF token, and hence not vulnerable.

Workaround

Add:

Header always edit Set-Cookie (JSESSIONID=.*) "$1; SameSite=Lax"
Header onsuccess edit Set-Cookie (JSESSIONID=.*) "$1; SameSite=Lax"

at the end of /opt/rudder/etc/rudder-apache-webapp-ssl.conf on your Rudder server, then reload the apache2 or httpd service. You can also restart the rudder-jetty service to force all users to authenticate again (and get a correct cookie). This will be automatically overwritten at next server update (which will contain the fix), there will be nothing to do.

You can control the correct application of this fix by disconnecting and reconnecting to you Rudder interface, and ensuring in you browser debugger that the JSESSIONID cookie has the SameSite=Lax value.

Patches

All Rudder versions are affected. This issue was fixed on 2022/07/26 in:

  • 6.2.16
  • 7.0.5
  • 7.1.3

References

#21445 on the bug tracker

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses