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
3.0
/ 10

CVSS base metrics

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