{"id":"CVE-2024-41672","aliases":["CVE-2024-41672","GHSA-w2gf-jxc9-pf2q","PYSEC-2024-203"],"related":[],"kind":"vulnerability","state":"published","title":"DuckDB: sniff_csv provides filesystem access even when enable_external_access is disabled","summary":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a file can be read (e.g. `/etc/hosts`, `proc/self/environ`, etc) even though that doesn't seem to be the intent of the sniff_csv function. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"DuckDB is a SQL database management system. In versions 1.0.0 and prior, content in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. This vulnerability provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. There seem to be two vectors to this vulnerability. First, access to files that should otherwise not be allowed. Second, the content from a file can be read (e.g. `/etc/hosts`, `proc/self/environ`, etc) even though that doesn't seem to be the intent of the sniff_csv function. A fix for this issue is available in commit c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a and is expected to be part of version 1.1.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nContent in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`. \n\n### Details\nDuring a pentest, a security researcher was able to access environment variable data and other system data by using the `sniff_csv` function, even though we set `enable_external_access` to false. \n\n### PoC\n```SQL\nSET enable_external_access=false;\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\n### Impact\nProvides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access. \n\nFor example `select * from read_csv('/proc/self/environ')` fails with a permission error. \n\nThere seems to be two vectors to this vulnerability: \n1. Access to files that should otherwise not be allowed. (We expect `Permission Error: Scanning CSV files is disabled through configuration` and not to provide any access to the file or even acknowledge that it exists). \n2. The content from a (non-csv?) file can be read (e.g. `/etc/hosts`, `proc/self/environ`, etc) even though that doesn't seem to be the intent of the sniff_csv function (my understanding is it's intending to provide information about the shape of the data, but not provide the data itself). \n\n### Workaround\nIt is possible to work around the issue by disabling the local file system using the `disabled_filesystems` setting:\n```SQL\nSET disabled_filesystems='LocalFileSystem';\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\nwill result in `Permission Error: File system LocalFileSystem has been disabled by configuration`.\n\n### Fix\nA fix has been merged into the `main` branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.","format":"markdown","source":"ghsa"},{"lang":"es","text":"DuckDB es un sistema de gestión de bases de datos SQL. En las versiones 1.0.0 y anteriores, se puede acceder al contenido del sistema de archivos para su lectura usando `sniff_csv`, incluso con `enable_external_access=false`. Esta vulnerabilidad proporciona a un atacante acceso al sistema de archivos incluso cuando se espera que el acceso esté deshabilitado y otras funciones similares NO brindan acceso. Parece haber dos vectores de esta vulnerabilidad. En primer lugar, el acceso a archivos que de otro modo no deberían permitirse. En segundo lugar, el contenido de un archivo se puede leer (por ejemplo, `/etc/hosts`, `proc/self/environ`, etc.) aunque esa no parezca ser la intención de la función sniff_csv. Hay una solución para este problema disponible en la confirmación c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a y se espera que forme parte de la versión 1.1.0.","source":"nvd"}],"published":"2024-07-24T17:47:20.626Z","modified":"2026-06-17T07:48:01.323Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"<= 1.0.0","status":"affected"}],"vendor":"duckdb","product":"duckdb","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"1.0.0","status":"affected"}],"vendor":"duckdb","product":"duckdb","cpe":"cpe:2.3:a:duckdb:duckdb:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.0.0","status":"affected","fixed":"1.1.0"}],"ecosystem":"PyPI","package":"duckdb","purl":"pkg:pypi/duckdb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.1.0"}],"vendor":"duckdb","product":"duckdb","cpe":"cpe:2.3:a:duckdb:duckdb:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.0"}],"ecosystem":"PyPI","package":"duckdb","purl":"pkg:pypi/duckdb","repo":"https://github.com/duckdb/duckdb","source":"pysec"}],"references":[{"url":"https://github.com/duckdb/duckdb/security/advisories/GHSA-w2gf-jxc9-pf2q","tags":["advisory","evidence","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/duckdb/duckdb/pull/13133","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/duckdb/duckdb/commit/c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41672","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/duckdb/duckdb","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/duckdb/PYSEC-2024-203.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-w2gf-jxc9-pf2q","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-07-24T18:07:30.477Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-41672","url":"https://www.cve.org/CVERecord?id=CVE-2024-41672","licence":"CVE Terms of Use","modified":"2024-08-02T04:46:52.916Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w2gf-jxc9-pf2q","url":"https://github.com/advisories/GHSA-w2gf-jxc9-pf2q","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:18.587Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-41672","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41672","licence":"Public domain","modified":"2026-06-17T07:48:01.323Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-203","url":"https://osv.dev/vulnerability/PYSEC-2024-203","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:16.437Z"}],"updatedAt":"2026-11-25T22:58:43.192Z","epss":{"score":0.00813,"percentile":0.58167,"date":"2026-12-01T12:00:22.000Z"}}