GHSA-R6FP-5M9V-39F6
The CVE-2026-44829 sanitiser was applied to three of four filename inputs
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche v8.35.0 | github.com/gotenberg/gotenberg/v8 · -96 d desde divulgación | |
| Divulgación | Publicada | GHSA-R6FP-5M9V-39F6 divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Two findings in gotenberg/gotenberg, both incomplete fixes of recent advisories, both verified live against the released image gotenberg/gotenberg:8.34.0.
Finding 1: the sanitiser added for CVE-2026-44829 was applied to three of the four filename inputs, leaving the Gotenberg-Output-Filename header on filepath.Base, which by the sanitiser's own documented reasoning does not strip backslashes on Linux, so a path-traversal ZIP entry name is still reachable.
Finding 2: the ReDoS budget added for CVE-2026-35458 caps a single match rather than a whole request, so the total regex time is multiplied without bound across headers and sub-resources.
Finding 1: the fourth filename input was not converted
Fix commit 93d0103 for CVE-2026-44829 / GHSA-hwc4-gmrw-5222 introduced sanitizeFilename and applied it at pkg/modules/api/context.go lines 366, 454 and 492. The fourth input, the Gotenberg-Output-Filename header, was left on plain filepath.Base at pkg/modules/api/middlewares.go line 155:
func outputFilenameMiddleware() echo.MiddlewareFunc { // line 149
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
filename := c.Request().Header.Get("Gotenberg-Output-Filename") // line 152
if filename != "" {
filename = filepath.Base(filename) // line 155
}The decisive evidence is the sanitiser's own documentation at context.go lines 687-688, which states that it strips path separators (including backslashes, which filepath.Base ignores on Linux) and control characters. The maintainers wrote this helper precisely because filepath.Base is insufficient on Linux, and then left one input using filepath.Base:
func sanitizeFilename(name string) string { // line 692
if i := strings.LastIndexAny(name, `/\`); i >= 0 { // line 693, handles backslash
name = name[i+1:]
}
// ...Verified live against stock gotenberg/gotenberg:8.34.0, producing these ZIP entry names:
..\..\..\..\Windows\System32\evil_0.pdf (raw hex 2e2e5c... confirmed on the wire)
C:\Windows\Temp\evil_0.pdf (rooted absolute, stronger than the parent CVE)
evil_0.pdf (control: the upload-filename input, on the patched path, is correctly sanitised)The rooted absolute form is worth calling out because it is strictly stronger than what the parent CVE produced. It is reachable on the three chromium convert routes with splitMode, and the Content-Disposition lane is universal. I also verified it in process through the real chain: outputFilenameMiddleware to newContext to OutputFilename to SplitPdfStub to BuildOutputFile.
Fix: call sanitizeFilename at middlewares.go line 155.
Finding 2: the ReDoS budget is per-match, not per-request
The fix for CVE-2026-35458 caps a single match at 5 seconds (routes.go around line 206), but events.go lines 129-147 runs one match per (paused sub-resource x header) with no shared budget and no context cancellation. The cap bounds one match while the number of matches is unbounded in two dimensions.
Verified live: 12 headers against 5 sub-resources saturated 5 to 6 cores for roughly 45 seconds after the client had already received its 503. Both multipliers are unbounded in the default configuration, since --api-body-limit is unlimited by default. It survives --chromium-deny-private-ips by using public IP literals.
Fix: a single request-scoped budget with context cancellation, so the total regex time per request is bounded rather than the time per match.
Verification
Both findings were executed against the released 8.34.0 image, with the finding-1 control demonstrating the sanitiser working correctly on the patched path.
Adjacent, not audited
The flags --chromium-enable-environment-proxy and --libreoffice-enable-environment-proxy (commit a92a7fe, post-8.34.0) are new code in the same subsystem as the last several advisories, and they deliberately relax dial pinning. I did not audit that path, but it is worth a look on your side.
Dedup
Both findings are incomplete fixes: finding 1 against CVE-2026-44829 / GHSA-hwc4-gmrw-5222, finding 2 against CVE-2026-35458. I did not find an existing advisory covering either residual.
Tooling
I used AI assistance while investigating. Both findings were reproduced against the released 8.34.0 image with controls, and I separately confirmed at HEAD that three call sites use sanitizeFilename while middlewares.go line 155 uses filepath.Base, and that the sanitiser's own doc comment gives the reason that matters.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/gotenberg/gotenberg/v8 |
Corregida | v8.35.0 | -96 d | v8.40.0 no afectada |
8.35.0v8.35.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/gotenberg/gotenberg/security/advisories/GHSA-r6fp-5m9v-39f6Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
