llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · jane-php/open-api-3

GHSA-C3CJ-3P6P-J822

Jane: $ref resolution performs SSRF + LFI (path traversal) at code-generation time (jane-php)

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 4.0
7.0
Alta
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión7.12.0
Exposición1 dDesde la divulgación, 19 nov 2026, 7:07 p. m.
Detección1 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada
Fuente: GitHub Security Advisories +2
11:43 a. m.
07:07 p. m.
10:18 p. m.
11:43 a. m.
08:22 p. m.
05:00 a. m.
01:39 p. m.
10:18 p. m.
FechaFaseEventoDetalle
Monitoreo Detectada Ingresó al índice
Divulgación Publicada GHSA-C3CJ-3P6P-J822 divulgada · CVSS 7 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Fuente: GitHub Security Advisories Registro visto por primera vez en GitHub Security Advisories
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
jane-php resolves external `$ref` targets at code-generation time via `file_get_contents($ref)` (jane-php/json-schema-runtime/Reference.php::doResolve) with no scheme/path restriction. An attacker-controlled OpenAPI document can therefore cause: `$ref: 'http://attacker/x'` -> SSRF (HTTP GET at gen time; response inlined = RFI); `$ref: '/abs/file'` -> LFI; `$ref: '../secret.yaml'` -> path-traversal LFI (CWE-22, arbitrary local JSON/YAML read). Verified 7.11.2/PHP8.1 (listener records the fetch; remote + `../` local content inlined into the generated code). `file://` rejected. CWE-918/CWE-98/CWE-611/CWE-22.

Details
// Reference.php::doResolve()
$contents = file_get_contents($fragment); // $fragment = attacker-controlled $ref URI

### Impact
Generating PHP with jane from an attacker-influenced OpenAPI document issues HTTP requests to attacker-chosen URLs (SSRF — internal services, cloud metadata) and reads arbitrary local files (LFI via `../`), at build/CI time, inlining results into the output.

### PoC
`reproduce.sh` (+ `make_spec.py`, `gen.php`): runs jane on a remote-$ref spec (local listener records the SSRF, output checked for the inlined response) and a `../`-traversal local-$ref spec (output checked for the leaked file).

### Suggested fix
Disable remote `$ref` fetching by default (or allow-list); confine local `$ref` to the spec directory (reject absolute paths and `..`). Don't `file_get_contents($ref)` on attacker-controlled URIs.

maintainer-report.txt https://github.com/user-attachments/files/29497381/maintainer-report.txt
reproduce.sh https://github.com/user-attachments/files/29497382/reproduce.sh
gen.php https://github.com/user-attachments/files/29497384/gen.php
make_spec.py https://github.com/user-attachments/files/29497385/make_spec.py

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

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:A
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:L
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
jane-php/open-api-3< 7.12.0
7.12.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistjane-php/open-api-3
Corregida 7.12.0 — —
Versiones corregidas7.12.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-63415
Otrahttps://github.com/janephp/janephp/security/advisories/GHSA-c3cj-3p6p-j822
Otrahttps://github.com/janephp/janephp/pull/961
Otrahttps://github.com/janephp/janephp/commit/75f2bbf79ca2f2eeb13080a2cebded1263396b49
Otrahttps://github.com/janephp/janephp
Otrahttps://github.com/janephp/janephp/releases/tag/v7.12.0

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