llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · nanobot-ai

GHSA-VC5V-6VWM-WF9M

ZDI-CAN-29369: Hong Kong University Data Intelligence Lab nanobot WebFetch Server-Side Request Forgery Information Disclosure Vulnerability

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.3
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -39 d de la divulgación
Exposición78 dDesde la divulgación, 1 sept 2026, 9:03 p. m.
Detección77 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 0.3.0
Monitoreo
Detectada +1
25 jul 26
2 sept 26
18 nov 26
19 nov 26
25 jul 26
23 ago 26
22 sept 26
21 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.3.0 nanobot-ai · -39 d desde divulgación
Divulgación Publicada GHSA-VC5V-6VWM-WF9M divulgada · CVSS 9.3 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

ZDI-CAN-29369: Hong Kong University Data Intelligence Lab nanobot WebFetch Server-Side Request Forgery Information Disclosure Vulnerability

-- CVSS -----------------------------------------

9.3: AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N

-- ABSTRACT -------------------------------------

Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products:
Hong Kong University Data Intelligence Lab - nanobot

-- VULNERABILITY DETAILS ------------------------
* Version tested: nanobot v0.1.4
* Platform tested: macOS 27.3

---

Analysis

Description

HKUDS nanobot, an AI agent framework with multi-platform chat integration, contains a server-side request forgery (SSRF) vulnerability in its web fetching tool. The `_validate_url()` function in `WebFetchTool` checks that URLs use an HTTP/HTTPS scheme and have a non-empty domain, but does not resolve hostnames or validate the target IP address against private, loopback, or link-local ranges. An attacker who can send messages to the bot on any enabled chat channel can instruct it to fetch URLs targeting internal network services, including cloud instance metadata endpoints (169.254.169.254), localhost services, and RFC 1918 private addresses. The HTTP client is configured to follow redirects, enabling redirect-based SSRF bypass. Successful exploitation allows extraction of cloud IAM credentials, internal service enumeration, and access to data from services that trust the server's network identity.

Boundary Crossed

External chat message -> Internal network access (RFC 1918, link-local, cloud metadata)

Root Cause

The `_validate_url()` function at `nanobot/agent/tools/web.py:33-43` validates URLs before the `WebFetchTool` fetches them. The check enforces `http`/`https` scheme and requires a non-empty netloc (domain), but performs no validation against internal/private IP ranges:

def _validate_url(url: str) -> tuple[bool, str]:
    """Validate URL: must be http(s) with valid domain."""
    try:
        p = urlparse(url)
        if p.scheme not in ('http', 'https'):
            return False, f"Only http/https allowed, got '{p.scheme or 'none'}'"
        if not p.netloc:
            return False, "Missing domain"
        return True, ""
    except Exception as e:
        return False, str(e)

The following internal targets all pass validation:

  • `http://169.254.169.254/` (AWS/GCP/Azure instance metadata)
  • `http://127.0.0.1:6379/` (localhost services)
  • `http://10.0.0.1/` (RFC 1918 private)
  • `http://192.168.1.1/` (RFC 1918 private)
  • `http://[::1]/` (IPv6 loopback)
  • `http://metadata.google.internal/` (GCP metadata)

Additionally, the `httpx.AsyncClient` is configured with `follow_redirects=True, max_redirects=5` (lines 122-124), enabling redirect-based SSRF bypass. An attacker-controlled URL that returns a 302 redirect to an internal IP will be followed.

The function name and its docstring ("Validate URL: must be http(s) with valid domain") confirm that URL validation was an intentional security consideration, making the absence of internal IP blocking a genuine oversight rather than a design choice.

Attack Vector

  1. Attacker sends a message to the bot on any enabled chat channel (Telegram, Discord, Slack, etc.). Default configuration allows all senders (no `allow_from` list required).
  1. The message instructs the LLM to fetch an internal URL:
  1. The LLM invokes `WebFetchTool.execute(url="http://169.254.169.254/latest/meta-data/iam/security-credentials/")`.
  1. `_validate_url()` passes the URL (http scheme, non-empty netloc).
  1. `httpx.AsyncClient.get()` makes an HTTP request to the cloud metadata endpoint from the server's network context.
  1. The response (containing IAM credentials, instance metadata, or internal service data) is returned to the LLM, which relays it back to the attacker.
Redirect Variant

If direct internal IPs are ever blocked at a network level, the attacker can use redirect-based SSRF:

  1. Attacker controls `https://attacker.com/redirect` which returns `HTTP 302 Location: http://169.254.169.254/latest/meta-data/`
  2. Instructs the bot to fetch `https://attacker.com/redirect`
  3. `httpx` follows the redirect to the internal IP

Impact

  • Cloud credential theft: AWS IAM role credentials, GCP service account tokens, Azure managed identity tokens via instance metadata endpoints
  • Internal service enumeration: Scan and interact with internal network services (Redis, Elasticsearch, databases, admin panels, Kubernetes API)
  • Data exfiltration: Read responses from any internal HTTP service that trusts the server's IP
  • Chained attacks: Stolen cloud credentials enable full infrastructure compromise

Proof of Concept

See `poc.py` in this directory. Run with `docker-compose up --build` for a safe test environment.

The PoC:
1. Demonstrates that `_validate_url()` accepts all internal IP ranges
2. Fetches from a mock metadata service simulating AWS EC2 instance metadata
3. Extracts simulated IAM credentials from the response
4. Generates `poc.pcap` capturing the SSRF request/response traffic

-- CREDIT ---------------------------------------
This vulnerability was discovered by:
Peter Girnus (@gothburz) and Project AESIR of TrendAI Zero Day Initiative

-- FURTHER DETAILS ------------------------------

Supporting files:
ZDI-CAN-29369.zip https://github.com/user-attachments/files/25445418/ZDI-CAN-29369.zip

If supporting files were contained with this report they are provided within a password protected ZIP file. The password is the ZDI candidate number in the form: ZDI-CAN-XXXX where XXXX is the ID number.

Please confirm receipt of this report. We expect all vendors to remediate ZDI vulnerabilities within 120 days of the reported date. If you are ready to release a patch at any point leading up to the deadline, please coordinate with us so that we may release our advisory detailing the issue. If the 120-day deadline is reached and no patch has been made available we will release a limited public advisory with our own mitigations, so that the public can protect themselves in the absence of a patch. Please keep us updated regarding the status of this issue and feel free to contact us at any time:

Zero Day Initiative
zdi-disclosures@trendmicro.com

The PGP key used for all ZDI vendor communications is available from:

http://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc

-- INFORMATION ABOUT THE ZDI --------------------
Established by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.

Please contact us for further details or refer to:

http://www.zerodayinitiative.com

-- DISCLOSURE POLICY ----------------------------

Our vulnerability disclosure policy is available online at:

http://www.zerodayinitiative.com/advisories/disclosure_policy/

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
nanobot-ai< 0.3.0
0.3.0
0.4.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypinanobot-ai
Corregida 0.3.0 -39 d 0.4.1 no afectada
Versiones corregidas0.3.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/HKUDS/nanobot/security/advisories/GHSA-vc5v-6vwm-wf9m

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.