{"id":"CVE-2026-12049","aliases":["CVE-2026-12049"],"related":[],"kind":"vulnerability","state":"published","title":"pgAdmin 4: Open redirect in multi-factor authentication flow via unvalidated 'next' parameter","summary":"Open redirect in pgAdmin 4's multi-factor authentication flow. The MFA validate and register endpoints honoured the user-supplied 'next' query/form parameter without confirming the target pointed back inside pgAdmin, so an authenticated victim who clicked /mfa/validate?next=<external> -- a link typically delivered by phishing -- would be sent to an attacker-controlled host directly out of the trusted auth flow.\n\nThe defect is a trusted-domain redirect, not a privilege bypass: the attacker gains no read/write access to pgAdmin or the victim's database, but the redirect launders the attacker's destination through pgAdmin's URL, which raises the success rate of credential-phishing follow-on against the victim.\n\nFix introduces a same-origin _is_safe_redirect_url helper and gates every MFA redirect that consumes user-supplied 'next' values through it. The helper allows only relative paths and absolute URLs whose scheme is http(s) and whose host matches the current request host; it rejects external hosts in absolute and protocol-relative form, non-http schemes (javascript:, data:, mailto:), userinfo tricks (http://localhost@attacker/), and backslash variants that some browsers normalize to forward slashes. Unsafe targets fall back to the internal browser index. A dedicated regression test exercises each accept/reject category and the original reporter PoC.\n\nThis issue affects pgAdmin 4: from 6.0 before 9.16.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Open redirect in pgAdmin 4's multi-factor authentication flow. The MFA validate and register endpoints honoured the user-supplied 'next' query/form parameter without confirming the target pointed back inside pgAdmin, so an authenticated victim who clicked /mfa/validate?next=<external> -- a link typically delivered by phishing -- would be sent to an attacker-controlled host directly out of the trusted auth flow.\n\nThe defect is a trusted-domain redirect, not a privilege bypass: the attacker gains no read/write access to pgAdmin or the victim's database, but the redirect launders the attacker's destination through pgAdmin's URL, which raises the success rate of credential-phishing follow-on against the victim.\n\nFix introduces a same-origin _is_safe_redirect_url helper and gates every MFA redirect that consumes user-supplied 'next' values through it. The helper allows only relative paths and absolute URLs whose scheme is http(s) and whose host matches the current request host; it rejects external hosts in absolute and protocol-relative form, non-http schemes (javascript:, data:, mailto:), userinfo tricks (http://localhost@attacker/), and backslash variants that some browsers normalize to forward slashes. Unsafe targets fall back to the internal browser index. A dedicated regression test exercises each accept/reject category and the original reporter PoC.\n\nThis issue affects pgAdmin 4: from 6.0 before 9.16.","source":"cvelist"},{"lang":"es","text":"Redirección abierta en el flujo de autenticación multifactor de pgAdmin 4. Los endpoints de validación y registro de MFA respetaban el parámetro de consulta/formulario ’next’ proporcionado por el usuario sin confirmar que el objetivo apuntaba de nuevo dentro de pgAdmin, por lo que una víctima autenticada que hiciera clic en /mfa/validate?next=[external] -- un enlace típicamente entregado por phishing -- sería enviada a un host controlado por un atacante directamente fuera del flujo de autenticación de confianza.\n\nEl defecto es una redirección de dominio de confianza, no un bypass de privilegios: el atacante no obtiene acceso de lectura/escritura a pgAdmin o a la base de datos de la víctima, pero la redirección ’lava’ el destino del atacante a través de la URL de pgAdmin, lo que aumenta la tasa de éxito del phishing de credenciales posterior contra la víctima.\n\nLa corrección introduce una función auxiliar _is_safe_redirect_url de mismo origen y filtra cada redirección de MFA que consume valores ’next’ proporcionados por el usuario a través de ella. La función auxiliar permite solo rutas relativas y URLs absolutas cuyo esquema es HTTP(s) y cuyo host coincide con el host de la solicitud actual; rechaza hosts externos en forma absoluta y relativa al protocolo, esquemas no-HTTP (javascript_disabled: , data:, mailto:), trucos de información de usuario (http://localhost@attacker/) y variantes de barra invertida que algunos navegadores normalizan a barras diagonales. Los objetivos inseguros recurren al índice interno del navegador. Una prueba de regresión dedicada ejercita cada categoría de aceptación/rechazo y la PoC del reportero original.\n\nEste problema afecta a pgAdmin 4: desde la versión 6.0 hasta antes de la 9.16.","source":"nvd"}],"published":"2026-06-18T23:37:43.328Z","modified":"2026-10-26T11:10:00.157Z","severity":{"scorer":"PostgreSQL","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"PostgreSQL","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"PostgreSQL","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"type":"custom","introduced":"6.0","fixed":"9.16","status":"affected"}],"vendor":"pgadmin.org","product":"pgAdmin 4","repo":"https://github.com/pgadmin-org/pgadmin4","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.0","fixed":"9.16"}],"vendor":"pgadmin","product":"pgadmin_4","cpe":"cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:*","source":"nvd"}],"references":[{"url":"https://github.com/pgadmin-org/pgadmin4/issues/10028","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/pgadmin-org/pgadmin4/commit/fff6a481854b07822c2b54e8181e6a9076d204cd","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":["Mai Phạm Hiền <mai.phamhien171@gmail.com>","Dave Page <page@pgadmin.org>","Kundan Sable <kundan.sable@enterprisedb.com>"],"assigner":"PostgreSQL","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-22T14:39:40.324Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-12049","url":"https://www.cve.org/CVERecord?id=CVE-2026-12049","licence":"CVE Terms of Use","modified":"2026-06-22T14:39:56.925Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-12049","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12049","licence":"Public domain","modified":"2026-10-26T11:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:25.209Z","epss":{"score":0.00235,"percentile":0.15445,"date":"2026-12-01T12:00:22.000Z"}}