GHSA-3G6M-VV3C-9P36
Authenticated SSRF in URL file import via IPv4-mapped IPv6 address bypass
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-3G6M-VV3C-9P36 divulgada · CVSS 2.2 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
What kind of vulnerability is it?
Server-Side Request Forgery (SSRF) via an IPv4-mapped IPv6 address that bypasses
the private/reserved-range filter of the URL-based file import feature.
The URL-import path validates the target host in
`NukeViet\Files\Upload::save_urlfile()` → `is_safe_url_target()` →
`resolve_host_ips()` → `is_safe_ip()`, where `is_safe_ip()` relied on:
filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)PHP does not canonicalize IPv4-mapped IPv6 addresses for these flags, so
`::ffff:127.0.0.1` (equivalently `::ffff:7f00:1`) is treated as an ordinary,
non-reserved IPv6 address and passes the filter, even though it is semantically
the loopback address `127.0.0.1`. The same holds for other embedded
representations of internal IPv4 space (`::ffff:169.254.169.254`,
`::ffff:10.0.0.1`, `64:ff9b::7f00:1`, `2002:7f00:1::1`, …). The validated
address is then pinned via `CURLOPT_RESOLVE` and fetched, and - on stacks that
map `::ffff:a.b.c.d` onto the IPv4 endpoint (Linux, BSD) - the request reaches
the internal service.
Who is impacted?
Only an authenticated administrator who has been granted the *upload file*
permission (submitting a hostname whose `AAAA` record resolves to a mapped
internal address). The demonstrated account is not a GOD administrator, but it
is a trusted administrator role, not an anonymous or low-privileged user.
What can an attacker actually do?
Under a default installation the practical impact is limited to:
- Blind SSRF - cause the server to issue `GET` requests to attacker-chosen
- Narrow internal read - persist an internal response into the upload tree
Why the impact is limited (mitigating factors).
- OS-dependent. The fetch only reaches the internal IPv4 service on stacks
- Two-layer MIME enforcement blocks text/JSON/HTML. To be saved, a response
- The PoC used a self-served valid PDF. A real attacker does not control
The residual, verified impact is therefore authenticated blind SSRF plus a
narrow binary-file read, not disclosure of text-based internal secrets.
A non-default deployment that enables the `text`/`xml` MIME groups widens the
confidentiality impact (e.g. `text/plain` metadata becomes readable).
Patches
Fixed in NukeViet 4.6.02
(commit `c25fefe` https://github.com/nukeviet/nukeviet/commit/c25fefe9fda8d362dd38d328664df2f8d1392287).
IPv4-mapped / IPv4-compatible / NAT64 / 6to4 addresses are now canonicalized and
the embedded IPv4 is re-checked against an explicit denylist (loopback, RFC1918,
link-local, cloud-metadata, CGNAT `100.64.0.0/10`, benchmarking
`198.18.0.0/15`, and other reserved ranges that `filter_var` also missed) before
the request is pinned. The check is centralized in
`NukeViet\Core\Ips::is_safe_public_ip()` / `is_safe_host()` and applied to all
three URL-fetch entry points (`Files\Upload`, `Files\Image`,
`admin/seotools/sitemapPing.php`); the latter two now resolve every `A`/`AAAA`
record and pin the validated IP, closing a related DNS-rebinding gap.
Users should upgrade to 4.6.02 or later.
Workarounds
For users who cannot upgrade immediately:
- Revoke the *upload file* permission from any administrator who does not
- Do not enable the non-default `text` or `xml` MIME groups, which keeps
- Ensure `NV_DEVELOPER_MODE` is not defined in production - developer mode
- At the network layer, restrict outbound traffic from the web server to
References
- Fix commit: https://github.com/nukeviet/nukeviet/commit/c25fefe9fda8d362dd38d328664df2f8d1392287
- Distinct prior SSRF advisory (different source/sink/boundary): GHSA-4chg-4752-w88r
- CWE-918: Server-Side Request Forgery (SSRF)
- CWE-184: Incomplete List of Disallowed Inputs
- Reported by canhieu; root-cause analysis and recommended fix adopted.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistnukeviet/nukeviet |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nukeviet/nukeviet/security/advisories/GHSA-3g6m-vv3c-9p36Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
