← Biblioteca de vulnerabilidades

CVE-2026-136503

Desbordamiento de memoria en psqlODBC

Alta7.5Publicada 25 de nov de 2026 · Actualizada 25 de nov de 2026

En resumen

Un atacante remoto, sin usuario ni contraseña, podría tomar el control del sistema afectado si engaña a alguien para que abra un archivo o un enlace.

Cómo se ataca

  • Se puede atacar por la red, incluso desde internet si el servicio está expuesto.
  • Requiere condiciones particulares que el atacante no siempre controla.
  • No necesita usuario ni contraseña.
  • Necesita que alguien haga algo, como abrir un archivo, visitar una página o hacer clic en un enlace.

Qué puede lograr el atacante

  • Leer información confidencial: datos, archivos o credenciales.
  • Modificar información o el sistema; en los casos graves, ejecutar sus propios programas.
  • Dejar el servicio o el equipo sin funcionar.

Cómo corregirla

  1. Revise si usa alguno de los productos y versiones de la lista «A qué afecta».
  2. Aplique la actualización o la mitigación que indica el fabricante.
  3. Si no puede actualizar ya, reduzca la exposición: que el servicio no sea accesible desde internet, o desactive la función afectada.

Recomendaciones para este tipo de fallo

  • Aplicar la actualización del fabricante: es la única corrección real para quien usa el producto.
  • Mientras tanto, limitar quién llega al servicio vulnerable (firewall, no exponerlo a internet, desactivar la función afectada).
  • Para quien desarrolla: comprobar tamaños antes de copiar, usar funciones con límite, compilar con protecciones (ASLR, DEP, canarios, FORTIFY_SOURCE) y considerar lenguajes con memoria segura (Rust, Go, C#, Java).

A qué afecta

  • PostgreSQL · psqlODBC

    hasta 18.00.0006 inclusive

Qué es: Escritura fuera de los límites de memoria (desbordamiento de búfer)

El programa escribe más datos de los que caben en un espacio de memoria y pisa lo que hay al lado, lo que permite a un atacante cerrar el programa o ejecutar su propio código.

En lenguajes como C y C++ el programador decide cuánto mide cada espacio de memoria. Si copia un dato recibido sin comprobar su tamaño, el exceso sobrescribe otras variables o direcciones de retorno. Un atacante que controla esos bytes puede desviar el programa a su código. Afecta sistemas operativos, navegadores, firmware de equipos y cualquier programa que procese archivos o tráfico de red.

Guía completa: dónde aparece, cómo se corrige y qué evitar

Descripción oficial (en inglés)

psqlODBC frees memory that is still in use, frees it twice, or writes outside an application buffer in these cases: - The clean-up the driver runs at commit and rollback sends queries of its own, and the reply to one of them can start the clean-up again while it is running. The nested run frees the rollback log, or the list of cursors and prepared statements to close, and the outer run uses and frees it again. - The callback through which libpq delivers notices could run that clean-up, and close the connection, while libpq was still using the connection. - Freeing a statement whose result holds several cursors (FetchRefcursors=1, or UseDeclareFetch=1) used the freed first result while the later cursors were closed. - With UseDeclareFetch=1, after a rollback closed an updatable cursor, rows added or deleted through it were counted but not stored, so freeing the statement freed uninitialised pointers, and adding a row wrote past the keyset. - After a multi-row fetch failed on a row other than the first of its rowset, SQLGetData() wrote at an offset past the buffer the application passed. - SQLProcedureColumns() freed the result of its catalog query twice when the query failed. - In a process named sqlservr (SQL Server linked servers), a server version below 8.4 made the statement parser free a buffer twice. - A failed SQLPutData in the middle of a SQLSetPos() or SQLBulkOperations() data-at-execution sequence left the whole operation pending, with the internal statement still allocated and autocommit silently off, so later statements were rolled back at disconnect. The next positioned update ran the stale callback against a statement that was never executed and dereferenced NULL. Most of these can be triggered by a hostile or compromised server, or anyone on the network path of a connection that does not use sslmode=verify-full (the default is disable). A database user who can make a statement fail, or who controls the contents of a row the application reads, can trigger the UseDeclareFetch=1 and SQLGetData() cases against an honest server. The demonstrated results are crashes and heap corruption; code execution has not been demonstrated. Versions up to and including psqlODBC 18.00.0006 are affected.