Skip to content

SSRF vulnerability due to insufficient filtering of cloud provider hosts

Low
TobiasBg published GHSA-x8rf-c8x6-mrpg Jan 30, 2024

Package

TablePress (PHP)

Affected versions

<= 2.2.4

Patched versions

>= 2.2.5

Description

Summary

For importing tables, TablePress makes external HTTP requests based on a URL that is provided by the user.
That user input is filtered insufficiently, which makes it is possible to send requests to unintended network locations and receive responses.

Specifically, the metadata API endpoint 169.254.169.254 of common cloud providers like AWS, Google Cloud, and others is at risk. While that exact IP address is already filtered, other notations like decimal or hex notations, or hostnames returning that IP, are not.

Details

The PoC requires a WordPress user role of Author or higher (to which the tablepress_import_tables access capability is assigned), as only these can use the import feature.

PoC

  1. Go to the TablePress "Import" screen.
  2. Choose the "URL" import source.
  3. Use an Import URL like http://host/latest/meta-data/, with host being having an DNS A record of 169.254.169.254.
  4. If the site is hosted on a common cloud provider's infrastructure, that endpoint's data will be parsed as a CSV file and shown, if it is available.

Impact

On sites in a cloud environment like AWS, an attacker can potentially make GET requests to the instance's metadata REST API. If the instance's configuration is insecure, this can lead to the exposure of internal data, including credentials.
Notably, cloud providers are more and more protecting this API endpoint by also requiring a special HTTP header to be present during the request. Also, only GET requests are possible with this method, further limiting the risk. Given that most WordPress sites are not hosted on dedicated cloud provider setups, the overall impact of this issue is low.

Severity

Low

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
Network
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

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:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N

CVE ID

CVE-2024-23825

Weaknesses

Credits