Wysoka

OpenRefine's PreviewExpressionCommand, which is eval, lacks protection against cross-site request forgery (CSRF)

  • Ujawniono: 24.10.2024
  • Aktualizacja: 11.10.2026 12:21

Summary

Lack of CSRF protection on the preview-expression command means that visiting a malicious website could cause an attacker-controlled expression to be executed. The expression can contain arbitrary Clojure or Python code.

The attacker must know a valid project ID of a project that contains at least one row.

Details

The com.google.refine.commands.expr.PreviewExpressionCommand class contains the following comment:

/**
 * The command uses POST but does not actually modify any state so it does not require CSRF.
 */

However, this appears to be false (or no longer true). The expression being previewed (executed) can be written in GREL, Python, or Clojure. Since there are no restrictions on what code can be executed, the expression can do anything the user running OpenRefine can do. For instance, the following expressions start a calculator:

clojure:(.exec (Runtime/getRuntime) "gnome-calculator")
jython:import os;os.system("gnome-calculator")

The lack of restrictions on expressions is arguably not a problem if the user is typing their own expressions into OpenRefine: they could have just as well typed them into Clojure or Python directly. However, since the preview-expression command does not check for a CSRF token, the expression can actually come from a HTML form submitted by a different origin, including arbitrary websites.

Issue #2164 suggested adding CSRF protection to all endpoints, but this endpoint was skipped (and the above comment added) in the associated PR #2182.

PoC

An example "malicious" page is at https://wandernauta.nl/or/ (of course, actual malicious pages would not wait for the victim to press the submit button).

The following curl command (substituting the project ID) also demonstrates the issue:

bash
curl -d project=123456789 -d cellIndex=1 -d rowIndices='[0]' -d 'expression=clojure:(.exec (Runtime/getRuntime) "gnome-calculator")' http://localhost:3333/command/core/preview-expression/

Impact

CSRF into remote code execution, provided the attacker knows at least one project ID in the victim's workspace and can convince the victim to open a malicious webpage.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Java / Kotlin (Maven) org.openrefine:main < 3.8.3 3.8.3

Odnośniki

Ocena CVSS 7.6/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L
Słabość (CWE)
CWE-352, CWE-94
Platforma
Java / Kotlin (Maven)
Paczka
org.openrefine:main
Ujawniono
24.10.2024
Aktualizacja
11.10.2026 12:21

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-3jm4-c6qf-jrh3 - CC BY 4.0

Historia podatności: org.openrefine:main

Wszystkie opisane podatności tej paczki (Java / Kotlin (Maven)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
4
Pierwsza → ostatnia
05.2022 10.2024
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 1
  • Średnia 3

Ujawnienia w latach

  1. 2022: 1
  2. 2023: 2
  3. 2024: 1
  4. 2025: 0
  5. 2026: 0
  1. OpenRefine's PreviewExpressionCommand, which is eval, lacks protection against cross-site request forgery (CSRF) ten wpis
    Wysoka · 7.6 CVE-2024-47879 < 3.8.3 3.8.3
  2. Średnia · 6.5 CVE-2022-41401 < 3.6.0 3.6.0
  3. Średnia · 5.5 CVE-2023-37476 < 3.7.4 3.7.4
  4. Średnia · 6.5 CVE-2018-19859 < 3.2-beta 3.2-beta

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.