llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · gix-credentials

GHSA-6WR8-3W4H-J9WJ

gitoxide credential helper protocol accepts bare carriage return in URL context

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

Parche disponible
Descargar PNG JSON
CVSS 3.1
3.1
Baja
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición129 dDesde la divulgación, 14 jul 2026, 10:50 p. m.
Detección126 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Modo siesta en el páramo activado.Esta no le quita el sueño ni a un SOC novato.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 0.38.2
Monitoreo
Detectada +1
15 jul 26
18 nov 26
21 nov 26
15 jul 26
16 ago 26
18 sept 26
20 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-6WR8-3W4H-J9WJ divulgada · CVSS 3.1 (GitHub)
Remediación Parche 0.38.2 gix-credentials · 0 d desde divulgación
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
gitoxide's credential-helper request serialization accepts a bare carriage return in URL context values. A caller-supplied URL reaches the helper line protocol as a `url=` field, but validation rejects only NUL and LF, so CR-sensitive credential helpers can parse one URL value as multiple helper fields. In a configuration with such a helper, an attacker-controlled URL can select credentials for a trusted host and cause those credentials to be returned to the caller handling the attacker URL.

### Details
The public credential lookup constructor stores caller-provided URL bytes directly in the request context: `Action::get_for_url()` builds `Action::Get(Context { url: Some(url.into()), .. })` in `gix-credentials/src/helper/mod.rs:85`. When the action is sent to a helper, `Context::write_to()` serializes that optional URL through the generic key/value writer at `gix-credentials/src/protocol/context/serde.rs:33`; `write_key()` writes `key`, `=`, the raw value, and then LF at `gix-credentials/src/protocol/context/serde.rs:14`. The validation immediately before serialization rejects NUL and LF in keys and values, but it does not reject `\r`, as shown in `gix-credentials/src/protocol/context/serde.rs:146`. `helper::raw()` then starts the configured helper, writes the serialized action to helper stdin, and later decodes helper stdout into an `Outcome` in `gix-credentials/src/helper/invoke.rs:43` and `gix-credentials/src/helper/invoke.rs:29`; the process plumbing that exposes stdin/stdout to the external helper is in `gix-credentials/src/program/mod.rs:117`. The result is the same credential-helper line-protocol shape as CVE-2024-52006: URL-controlled bytes are serialized after an incomplete record-terminator check, leaving bare CR available to helpers whose line reader treats it as a separator.

### Reproduction
poc.zip https://github.com/user-attachments/files/30026952/poc.zip

bash ./poc/run.sh
GITOXIDE_CR_HELPER_INJECTION: host=trusted.example

The fingerprint is printed by the local credential-helper fixture only after it receives an injected `host=trusted.example` field through gitoxide's helper stdin. A build failure or non-zero exit without that fingerprint would be setup noise or an unrelated failure, not this CR field-injection path.

### Impact
An unauthenticated remote attacker needs a workflow where a victim application or user passes an attacker-controlled Git or credential URL to gitoxide for credential lookup. Exploitation also depends on a configured external credential helper that treats bare carriage return as a line terminator and has stored credentials for the injected trusted host; helpers that split only on LF are not demonstrated affected. Under those preconditions, the attacker can supply a URL such as `https://evil.example\rhost=trusted.example\rprotocol=https`, bypass the LF/NUL-only validation, and cause the helper to return credentials for `trusted.example` to the gitoxide caller handling `evil.example`. The local PoC demonstrates credential selection and return to the in-process caller; direct disclosure to the attacker depends on the surrounding application using, logging, or returning that credential in the attacker-controlled workflow.

Suggested fix
diff --git a/gix-credentials/src/protocol/context/serde.rs b/gix-credentials/src/protocol/context/serde.rs
index 18a44c5..7e2aec2 100644
--- a/gix-credentials/src/protocol/context/serde.rs
+++ b/gix-credentials/src/protocol/context/serde.rs
@@ -144,7 +144,13 @@ pub mod decode {
 }
 
 fn validate(key: &str, value: &BStr) -> Result<(), Error> {
-    if key.contains('\0') || key.contains('\n') || value.contains(&0) || value.contains(&b'\n') {
+    if key.contains('\0')
+        || key.contains('\n')
+        || key.contains('\r')
+        || value.contains(&0)
+        || value.contains(&b'\n')
+        || value.contains(&b'\r')
+    {
         return Err(Error::Encoding {
             key: key.to_owned(),
             value: value.to_owned(),

*Reported by Team Atlanta.*

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:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
gix-credentials≤ 0.38.1
0.38.1
0.42.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iogix-credentials
Corregida 0.38.2 0 d 0.42.1 no afectada
Versiones corregidas0.38.2
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-6wr8-3w4h-j9wj

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