GHSA-P32V-8V8J-J534
Refitter allows arbitrary code execution through unescaped OpenAPI content-type values
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-P32V-8V8J-J534 divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Refitter emits the spec's content-type key (content map key in requestBody/responses) verbatim into a Refit `[Headers("Accept: <ct>", "Content-Type: <ct>")]` attribute string without escaping
`"`. A crafted value survives Refitter's default OpenAPI validation, breaks out of the attribute and
the enclosing interface + namespace, injects a top-level `file class` with a `[ModuleInitializer]`
method, and reopens so the file stays valid. .NET runs `[ModuleInitializer]` methods at assembly
load, so the attacker's code executes at application startup. Verified on Refitter 2.0.0 / .NET 8.
The malicious input is a content-type KEY such as: content: { 'application/<breakout>': {schema} }.
No `--skip-validation` is required.
PoC
`reproduce.sh` (+ `make_spec.py`) attached: generates with default validation, compiles into a
console app, runs it (Main does not touch the client), and shows a marker written at assembly load.
Impact
Code execution at assembly load (process startup) in any application that compiles a Refitter client
generated from an attacker-controlled or attacker-influenced OpenAPI description. Estimated Critical, e.g.
`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N` (the CNA sets the final score).
Suggested fix
Escape every spec-derived string before emitting it into a Refit attribute (escape `"`, `\`,
reject newlines) and validate characters. We recommend auditing all attribute emissions that embed
spec-derived values, using one shared encoder.
reproduce.sh https://github.com/user-attachments/files/29394848/reproduce.sh
maintainer-report.txt https://github.com/user-attachments/files/29394851/maintainer-report.txt
make_spec.py https://github.com/user-attachments/files/29394853/make_spec.py
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
NuGetRefitter |
Corregida | 2.1.2 | — | — |
2.1.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://nvd.nist.gov/vuln/detail/CVE-2026-63344https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534https://github.com/christianhelle/refitter/pull/1178https://github.com/christianhelle/refitter/commit/ab4d8e439d6f0ee82ad49ee15323978d70fe5a67https://github.com/christianhelle/refitterhttps://github.com/christianhelle/refitter/releases/tag/2.1.2https://github.com/user-attachments/files/29394848/reproduce.shhttps://github.com/user-attachments/files/29394851/maintainer-report.txthttps://github.com/user-attachments/files/29394853/make_spec.pyLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
