Alta

sniff_csv provides filesystem access even when enable_external_access is disabled in duckdb

  • Publicada: 24.07.2024
  • Actualizado: 11.10.2026 12:20

Summary

Content in filesystem is accessible for reading using sniff_csv, even with enable_external_access=false.

Details

During 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.

PoC

sql
SET enable_external_access=false;
SET lock_configuration=true;

SELECT Columns FROM sniff_csv('/proc/self/environ');

Impact

Provides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access.

For example select * from read_csv('/proc/self/environ') fails with a permission error.

There seems to be two vectors to this vulnerability:

  1. 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).
  2. 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).

Workaround

It is possible to work around the issue by disabling the local file system using the disabled_filesystems setting:

sql
SET disabled_filesystems='LocalFileSystem';
SET lock_configuration=true;

SELECT Columns FROM sniff_csv('/proc/self/environ');

will result in Permission Error: File system LocalFileSystem has been disabled by configuration.

Fix

A fix has been merged into the main branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) duckdb >= 1.0.0, < 1.1.0 1.1.0

Referencias

Puntuación CVSS 7.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Debilidad (CWE)
CWE-200
Plataforma
Python (PyPI)
Paquete
duckdb
Publicada
24.07.2024
Actualizado
11.10.2026 12:20

Fuentes y licencias

OSV / GitHub Advisory Database - PYSEC-2024-203 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-w2gf-jxc9-pf2q - CC BY 4.0

Historial de vulnerabilidades: duckdb

Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
3
Primera → última
01.2024 11.2025
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 1
  • Alta 1
  • Media 1

Divulgaciones por año

  1. 2024: 2
  2. 2025: 1
  3. 2026: 0
  1. sniff_csv provides filesystem access even when enable_external_access is disabled in duckdb esta entrada
    Alta · 7.5 CVE-2024-41672 >= 1.0.0, < 1.1.0 1.1.0

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.