GHSA-475g-vj6c-xf96

Suggest an improvement
Source
https://github.com/advisories/GHSA-475g-vj6c-xf96
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-475g-vj6c-xf96/GHSA-475g-vj6c-xf96.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-475g-vj6c-xf96
Aliases
Published
2024-01-30T20:57:16Z
Modified
2024-01-30T20:57:16Z
Severity
  • 5.7 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N CVSS Calculator
Summary
CrateDB database has an arbitrary file read vulnerability
Details

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

Database specific
{
    "nvd_published_at": "2024-01-30T17:15:12Z",
    "cwe_ids": [
        "CWE-22"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-01-30T20:57:16Z"
}
References

Affected packages

Maven / io.crate:crate

Package

Name
io.crate:crate
View open source insights on deps.dev
Purl
pkg:maven/io.crate/crate

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.3.9

Maven / io.crate:crate

Package

Name
io.crate:crate
View open source insights on deps.dev
Purl
pkg:maven/io.crate/crate

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.4.0
Fixed
5.4.8

Maven / io.crate:crate

Package

Name
io.crate:crate
View open source insights on deps.dev
Purl
pkg:maven/io.crate/crate

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.5.4

Maven / io.crate:crate

Package

Name
io.crate:crate
View open source insights on deps.dev
Purl
pkg:maven/io.crate/crate

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.6.0
Fixed
5.6.1

Affected versions

5.*

5.6.0