llamaCVEVulnerability Intelligence
/
Advisory · GitHub · NuGet · Refitter

GHSA-3FHM-P725-H3G3

Refitter allows arbitrary code execution through unescaped OpenAPI paths

Parche disponible
Descargar PNG JSON
CVSS
—
critical
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.1.2
Exposición6 hDesde la divulgación, 19 nov 2026, 7:06 p. m.
Detección13 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 +1
07:06 p. m.
12:58 a. m.
07:06 p. m.
08:34 p. m.
10:02 p. m.
11:30 p. m.
12:58 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-3FHM-P725-H3G3 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Refitter emits each OpenAPI path (the paths-object key) verbatim into a Refit `[Get("<path>")]`
attribute string, without escaping `"` or restricting characters. A crafted single-line, /-prefixed
path survives Refitter's default OpenAPI validation yet closes the attribute string and the enclosing
interface + namespace, injects a top-level `file class` with a `[ModuleInitializer]` method, and
reopens a namespace + interface so the file stays valid. .NET runs `[ModuleInitializer]` methods when
the generated assembly is loaded, so the attacker's code executes at application startup. Verified on
Refitter 2.0.0 / .NET 8.

Details
[Get("/p")] Task<string> Dummy(); } }
file class Evil { [System.Runtime.CompilerServices.ModuleInitializer]
  internal static void Init(){ /* attacker code */ } }
namespace N2 { public partial interface I2 { [Get("/q")]
        Task<string> GetU(string id);
    }
}

No `--skip-validation` is needed (the payload is a valid single-line path). The generated `.cs` is
compiled into the victim application; the module initializer runs at assembly load. This is distinct
from the value sinks (enum/default), which are escaped; the path sink has no escaping. The
`[Header("<name>")]` attribute is likewise emitted raw (header parameter names), at minimum a
build-breaking DoS.

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. Verified
on 2.0.0.

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.

Suggested fix

Escape the route template before emitting it into `[Get("…")]` (escape `"`, `\`, reject newlines) and
validate that paths contain only legal URI-template characters. Apply the same encoding to
`[Header(…)]`, `[Post/Put/Delete(…)]`, and every attribute that embeds a spec-derived string.
maintainer-report.txt https://github.com/user-attachments/files/29395228/maintainer-report.txt
make_spec.py https://github.com/user-attachments/files/29395229/make_spec.py
reproduce.sh https://github.com/user-attachments/files/29395230/reproduce.sh

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

Versiones

Rangos afectados

Afectada Corregida
Refitter< 2.1.2
2.1.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
NuGetRefitter
Corregida 2.1.2 — —
Versiones corregidas2.1.2
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-63345
Otrahttps://github.com/christianhelle/refitter/security/advisories/GHSA-3fhm-p725-h3g3
Otrahttps://github.com/christianhelle/refitter/pull/1178
Otrahttps://github.com/christianhelle/refitter/commit/793d2632899c2022511dfc15e30725ef69073973
Otrahttps://github.com/christianhelle/refitter
Otrahttps://github.com/christianhelle/refitter/releases/tag/2.1.2
Otrahttps://github.com/user-attachments/files/29395228/maintainer-report.txt
Otrahttps://github.com/user-attachments/files/29395229/make_spec.py
Otrahttps://github.com/user-attachments/files/29395230/reproduce.sh

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