← Übersicht Puppet / OpenVox

Unauthenticated client can replace a pending CSR before an operator signs it

GHSA-5g5r-vg6r-jhxq

Mittel · CVSS 6.8 Netzwerk · ohne Login · Nutzerinteraktion Fix verfügbar

Veröffentlicht
13.10.2026 14:05
Zuletzt geändert
13.10.2026
EPSS (30 Tage)
unbekannt
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

Beschreibung

Originaltext der Quelle, nicht übersetzt.

Before commit `a0beda18fdc7`, anyone who could reach `PUT /puppet-ca/v1/certificate_request/{subject}` could overwrite a pending CSR for that subject with one carrying their own key. When the operator later signed the subject by name, the CA issued a certificate for the attacker's key. Found in an independent audit at `fb856f1` and re-checked against `main` at `145cb53`. ## Where Line numbers are as of `145cb53`, before the fix. `CA.SaveRequest` in `internal/ca/signing.go` (around lines 1028-1046) took the subject lock, called `evictRevokedLocked` to refuse a subject that already held a live certificate, then called `Storage.SaveCSR`. Nothing checked for an existing pending CSR. `SaveCSR` ends in an unconditional `backend.Put` (`internal/storage/storage.go:968-972`), so the second submission replaced the first. OpenVox Server refuses this case by default (`allow-duplicate-certs=false`): a CSR is rejected when the subject already has either a certificate or a pending request. ## Reproduction On a build before the fix, against a running CA with manual signing: 1. Submit a CSR for `node2.example.com` with key A (the legitimate node). 2. Submit a second, unauthenticated CSR for `node2.example.com` with key B. 3. As admin, sign `node2.example.com` (`openvox-ca-ctl sign --certname node2.example.com`). 4. Fetch the certificate. Its public key matches key B. The auditors confirmed this live over the API and with a package-level Go test. ## Impact In a manual-signing deployment, an attacker could take over a node's identity in the window between enrolment and approval. The operator saw the expected certname and signed it. Comparing CSR fingerprints catches it, but only if the operator does that. With autosign on, the window is usually too short to matter. ## Fix Fixed on `main` on 2026-10-13 in commit [`a0beda18fdc723a1375a0cf2282c96104176fc3b`](https://github.com/voxpupuli/openvox-ca/commit/a0beda18fdc723a1375a0cf2282c96104176fc3b) (PR #462, closes #410), Go module version `v0.0.0-20261013120225-a0beda18fdc7`. openvox-ca now follows OpenVox Server's duplicate-certificate policy, with a new `allow_duplicate_certs` setting (env `PUPPET_CA_ALLOW_DUPLICATE_CERTS`) that defaults to `false`, as upstream's `allow-duplicate-certs` does. With it off, `PUT /certificate_request/{subject}` refuses a CSR with `400 Bad Request` and OpenVox Server's message (`<subject> already has a {requested|signed|revoked} certificate; ignoring certificate request`) when the subject already has: 1. a pending CSR, including an identical resubmission of the same CSR. This closes the key substitution described here; 2. a signed certificate, instead of the previous `200`; 3. a revoked certificate, until the subject is cleaned. Previously openvox-ca discarded the revoked certificate and accepted the new CSR. The check runs before autosigning, so it applies whatever the autosign policy says. To let a subject enrol again, clean it (`openvox-ca-ctl clean`, as `puppetserver ca clean` upstream). Each refusal is logged, at `INFO` for a pending CSR and at `WARN` with a remedy for a signed or revoked certificate. Agents are unaffected. OpenVox's SSL state machine reads a `400` on CSR submission as "keep waiting for the certificate", for an existing CSR, a signed certificate and a revoked one alike. `allow_duplicate_certs: true` restores replacement for anyone who relies on it. The docs say plainly what that allows: a pending CSR is overwritten by the newest submission from any client, and a signed or revoked certificate stays valid beside a queued request. The server logs a `WARN` at startup when the setting is combined with any autosign mode. ## What to do Move to a build that includes `a0beda18fdc7` (2026-10-13 or later), and leave `allow_duplicate_certs` at its default, `false`. Nodes whose certificate is revoked, lost or expired now need cleaning before they can enrol again. On any build, compare a pending request's fingerprint (`GET /certificate_status/{subject}`, or `openvox-ca-ctl list`) with the node's own before signing it by name.

Betroffene Pakete im beobachteten Stack

Gogithub.com/voxpupuli/openvox-ca0.0.0-20261013120225-a0beda18fdc7GHSA-5g5r-vg6r-jhxq

Empfohlene Prüfung

  1. Feststellen, ob und in welcher Version die betroffenen Pakete in Ihren Systemen, Images und Abhängigkeiten vorkommen.
  2. Wo eine Fix-Version genannt ist: aktualisieren. Wo nicht: Hersteller-Advisory und Referenzen auf Workarounds prüfen.
  3. Erreichbarkeit beachten: Der Angriffsweg (Netzwerk · ohne Login · Nutzerinteraktion) ist aus dem CVSS-Vektor abgeleitet.

Diese Seite sagt nichts darüber, ob Ihre Systeme betroffen sind. Das klärt erst eine Prüfung Ihrer Versionen.