{"id":"CVE-2024-47879","aliases":["CVE-2024-47879","GHSA-3jm4-c6qf-jrh3"],"related":[],"kind":"vulnerability","state":"published","title":"OpenRefine's PreviewExpressionCommand, which is eval, lacks protection against cross-site request forgery (CSRF)","summary":"OpenRefine is a free, open source tool for working with messy data. Prior to version 3.8.3, lack of cross-site request forgery 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, and the attacker must convince the victim to open a malicious webpage. Version 3.8.3 fixes the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenRefine is a free, open source tool for working with messy data. Prior to version 3.8.3, lack of cross-site request forgery 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, and the attacker must convince the victim to open a malicious webpage. Version 3.8.3 fixes the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nLack 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.\n\nThe attacker must know a valid project ID of a project that contains at least one row.\n\n### Details\n\nThe `com.google.refine.commands.expr.PreviewExpressionCommand` class contains the following comment:\n```\n/**\n * The command uses POST but does not actually modify any state so it does not require CSRF.\n */\n```\n\nHowever, 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:\n\n```\nclojure:(.exec (Runtime/getRuntime) \"gnome-calculator\")\n```\n\n```\njython:import os;os.system(\"gnome-calculator\")\n```\n\nThe 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.\n\nIssue #2164 suggested adding CSRF protection to all endpoints, but this endpoint was skipped (and the above comment added) in the associated PR #2182.\n\n### PoC\n\nAn 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).\n\nThe following curl command (substituting the project ID) also demonstrates the issue:\n\n```sh\ncurl -d project=123456789 -d cellIndex=1 -d rowIndices='[0]' -d 'expression=clojure:(.exec (Runtime/getRuntime) \"gnome-calculator\")' http://localhost:3333/command/core/preview-expression/\n```\n\n### Impact\n\nCSRF 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"OpenRefine es una herramienta gratuita de código abierto para trabajar con datos desordenados. Antes de la versión 3.8.3, la falta de protección contra cross-site request forgery en el comando `preview-expression` significa que visitar un sitio web malicioso podría provocar la ejecución de una expresión controlada por el atacante. La expresión puede contener código arbitrario de Clojure o Python. El atacante debe conocer un ID de proyecto válido de un proyecto que contenga al menos una fila, y debe convencer a la víctima de que abra una página web maliciosa. La versión 3.8.3 soluciona el problema.","source":"nvd"}],"published":"2024-10-24T17:58:53.000Z","modified":"2026-06-17T07:57:54.393Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L","score":7.6,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-94","CWE-352"],"affected":[{"ranges":[{"version":"< 3.8.3","status":"affected"}],"vendor":"OpenRefine","product":"OpenRefine","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"3.8.3","status":"affected"}],"vendor":"openrefine","product":"openrefine","cpe":"cpe:2.3:a:openrefine:openrefine:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.8.3"}],"ecosystem":"Maven","package":"org.openrefine:main","purl":"pkg:maven/org.openrefine/main","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.8.3"}],"vendor":"openrefine","product":"openrefine","cpe":"cpe:2.3:a:openrefine:openrefine:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/OpenRefine/OpenRefine/security/advisories/GHSA-3jm4-c6qf-jrh3","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/OpenRefine/OpenRefine/commit/090924ca923489b6c94397cf1f5df7f7f78f0126","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47879","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/OpenRefine/OpenRefine","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-10-25T15:23:58.665Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47879","url":"https://www.cve.org/CVERecord?id=CVE-2024-47879","licence":"CVE Terms of Use","modified":"2024-10-25T15:24:58.242Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3jm4-c6qf-jrh3","url":"https://github.com/advisories/GHSA-3jm4-c6qf-jrh3","licence":"CC-BY-4.0","modified":"2024-12-04T22:26:42.883Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47879","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47879","licence":"Public domain","modified":"2026-06-17T07:57:54.393Z"}],"updatedAt":"2026-11-25T22:58:47.276Z","epss":{"score":0.00428,"percentile":0.3895,"date":"2026-12-01T12:00:22.000Z"}}