llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @cyclonedx/cdxgen

GHSA-4V76-RXFX-X42X

Crafted CrewAI agents.py or tasks.py parses in quadratic time and blocks the event loop

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición15 dDesde la divulgación, 6 nov 2026, 12:11 a. m.
Detección12 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 la severidad declarada por GHSA (media) 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.
Agenda, parchea y celebra con un mate.Esto no amerita reunión. Un ticket basta.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 12.9.1
Monitoreo
Detectada +1
6 nov 26
18 nov 26
21 nov 26
6 nov 26
10 nov 26
13 nov 26
17 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4V76-RXFX-X42X divulgada
Remediación Parche 12.9.1 @cyclonedx/cdxgen · 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

The parser for CrewAI `agents.py` and `tasks.py` files used regular expressions whose running time grew with the square of the input. A crafted file in a scanned repository kept the Node.js event loop busy for seconds per megabyte, in the CLI and in server mode with `type=ai-skill` or `type=ai`.

Details

`parseCrewAiPython()` in `lib/inventory/communityAiConfigParser.js` (`lib/helpers/communityAiConfigParser.js` in 12.x) ran an unanchored multi-line expression, `def\s+NAME\s*\([^)]*\):[\s\S]*?return\s+Agent\(...`, over the whole file. When no `return Agent(` follows, the engine scans the rest of the file again from every `def`. The helpers that read `role`, `goal` and `tools` from a match had the same shape: `dedent(` without a quote and `tools=[` without a closing bracket each rescanned to the end of the input. The file is read without a size limit and parsing is synchronous.

Proof of concept
node -e 'require("node:fs").writeFileSync("agents.py", "from crewai import Agent\n" + "def x():\n".repeat(128000))'
cdxgen --no-install-deps -t ai-skill -o bom.json .

The 1.15 MB file took about 3.5 seconds to parse, and doubling its size roughly quadrupled the time.

Impact

Denial of service. A repository can stall CI scans, and a request to an unauthenticated cdxgen server for a crafted public repository blocks the server's event loop, delaying other requests and health checks. Confidentiality and integrity are not affected.

Patches

Fixed in `@cyclonedx/cdxgen` 12.9.1 (#4758, commit 1a283ce https://github.com/cdxgen/cdxgen/commit/1a283ce1a668e1ceebac78f2e0a5e1bf5a6d8ad2). The fix for `@cdxgen/cdxgen` is in #4759 (commit 51d645e https://github.com/cdxgen/cdxgen/commit/51d645e5d8a889405062ab7d96a8bb0369fad444) and will ship in 13.7.0. The parser now splits the module into logical lines in a single pass that respects strings, comments and brackets, finds each function's body by indentation, and reads the arguments of a returned `Agent` or `Task` call only within that call's own logical line. The proof-of-concept file now parses in about 12 milliseconds, and tests bound the time on four crafted shapes. The rewrite also reports agents under the function that returns them and reads triple-quoted values, which the expressions missed.

Workarounds

Do not run `ai-skill` or `ai` scans of untrusted repositories, and in server mode do not accept those project types from untrusted clients.

Credits

Reported by @andife.

References
  • https://github.com/cdxgen/cdxgen/pull/4758
  • https://github.com/cdxgen/cdxgen/pull/4759

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

Versiones

Rangos afectados

Afectada Corregida Última
@cyclonedx/cdxgen≥ 12.3.1 < 12.9.1
@cyclonedx/cdxgen≥ 13.0.0 < 13.7.0
12.3.1
12.9.1
12.9.2
13.0.0
13.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@cyclonedx/cdxgen
Corregida 12.9.1 0 d 12.9.2 no afectada
Versiones corregidas12.9.113.7.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/cdxgen/cdxgen/security/advisories/GHSA-4v76-rxfx-x42x

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