Skip to content

CrateDB database has an arbitrary file read vulnerability

Moderate severity GitHub Reviewed Published Jan 30, 2024 in crate/crate • Updated Jan 30, 2024

Package

maven io.crate:crate (Maven)

Affected versions

< 5.3.9
>= 5.4.0, < 5.4.8
>= 5.5.0, < 5.5.4
= 5.6.0

Patched versions

5.3.9
5.4.8
5.5.4
5.6.1

Description

Summary

There is an arbitrary file read vulnerability in the CrateDB database, and authenticated CrateDB database users can read any file on the system.

Details

There is a COPY FROM function in the CrateDB database that is used to import file data into database tables. This function has a flaw, and authenticated attackers can use the COPY FROM function to import arbitrary file content into database tables, resulting in information leakage.

PoC

CREATE TABLE info_leak(info_leak STRING);
COPY info_leak FROM '/etc/passwd' with (format='csv', header=false); or COPY info_leak FROM '/crate/config/crate.yml' with (format='csv', header=false);
SELECT * FROM info_leak;

image

Impact

This vulnerability affects all current versions of the CrateDB database. Attackers who exploit this vulnerability to obtain sensitive information may carry out further attacks, while also affecting CrateDB Cloud Clusters.
image

References

@seut seut published to crate/crate Jan 30, 2024
Published by the National Vulnerability Database Jan 30, 2024
Published to the GitHub Advisory Database Jan 30, 2024
Reviewed Jan 30, 2024
Last updated Jan 30, 2024

Severity

Moderate

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
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
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:L/PR:L/UI:R/S:U/C:H/I:N/A:N

EPSS score

19.660%
(96th percentile)

Weaknesses

CVE ID

CVE-2024-24565

GHSA ID

GHSA-475g-vj6c-xf96

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.