{"id":"GHSA-2vpj-96q8-p9j5","aliases":[],"summary":"With allow_subject_alt_names enabled, any enrolled agent can add new DNS SANs at CSR renewal without operator review","published_at":"2026-10-13T09:40:48Z","modified_at":"2026-10-13T09:40:48Z","products":[{"slug":"puppet","name":"Puppet / OpenVox","category":"iac"}],"rating":{"severity":"medium","score":6.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","attack_path":"internet_authenticated","user_interaction":false,"malicious":false},"fix_available":true,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"priority":7.8,"record_count":1,"vendors":["GitHub"],"details":"Before commit `02fb61556aa0`, with `allow_subject_alt_names: true`, the CSR-body branch of `POST /certificate_renewal` signed whatever DNS SANs the agent asked for, including the Puppet server's own name. The request needed only the agent's own certificate. It didn't go through autosign policy or an operator. The docs presented the setting as risky with autosign. They didn't say that it also let every enrolled node grant itself new names at renewal.\r\n\r\nThe default was safe. The SAN gate added in `145c5b6` (#293) covers every signing path, and with the setting off, renewal could only carry forward SANs the presented certificate already held. This report is about the opt-in.\r\n\r\nFound while re-checking an independent audit (finding A1 at `fb856f1`) against `main` at `145cb53`.\r\n\r\n## Where\r\n\r\nLine numbers are as of `145cb53`, before the fix.\r\n\r\n- `handlePostCertificateRenewal` → `CA.Renew` (`internal/ca/signing.go:1168`) → `signWithDuration(..., presentedCert)` (`signing.go:1297`).\r\n- `checkSubjectAltNames` (`signing.go:585`) built a baseline from the presented certificate's SANs (`:486-489`) plus the certname (`:494`). With the setting on, every requested DNS name passed, and `:589` copied them into the certificate. `issueLeafLocked` always sets EKU `serverAuth, clientAuth`.\r\n- `docs/configuration.md:1318-1360` (\"Subject alternative names requested by a CSR\") explained the impersonation risk only for autosigning and suggested \"a narrow autosign policy alongside it\".\r\n\r\n## Reproduction\r\n\r\nOn a build before the fix, with `allow_subject_alt_names: true` and an agent `agent1.example.com` holding a certificate from this CA:\r\n\r\n```sh\r\nopenssl req -new -newkey rsa:2048 -nodes -keyout evil.key \\\r\n  -subj \"/CN=agent1.example.com\" \\\r\n  -addext \"subjectAltName=DNS:puppet.example.com\" -out evil.csr\r\ncurl --cacert ca_crt.pem --cert agent.crt --key agent.key \\\r\n  -X POST --data-binary @evil.csr \\\r\n  https://puppet.example.com:8140/puppet-ca/v1/certificate_renewal -o new.pem\r\nopenssl verify -CAfile ca_crt.pem -purpose sslserver \\\r\n  -verify_hostname puppet.example.com new.pem\r\n```\r\n\r\nThe last command prints `OK`. The auditors ran the equivalent against `fb856f1`, before the SAN gate existed, and served TLS as the Puppet server with the result.\r\n\r\n## Impact\r\n\r\nAn operator who turned the setting on so a few nodes could carry extra names, and kept manual signing to review them, got no review at renewal. Any compromised node could mint a certificate the whole fleet accepts as the Puppet server and man-in-the-middle catalog delivery, which is code execution on every agent. OpenVox Server has no CSR-based renewal, so its `allow-subject-alt-names` doesn't carry this exposure.\r\n\r\n## Fix\r\n\r\nFixed on `main` on 2026-10-13 in commit [`02fb61556aa0d22de7be4da321d0ab23016ce980`](https://github.com/voxpupuli/openvox-ca/commit/02fb61556aa0d22de7be4da321d0ab23016ce980) (PR #471, closes #469), Go module version `v0.0.0-20261013093713-02fb61556aa0`.\r\n\r\nRenewal now recreates the presented certificate, as OpenVox Server's renewal does, on both paths:\r\n\r\n- A renewal with a CSR body (re-key) takes only the public key from the CSR. Any other subject attributes, SANs or extensions it carries are ignored, not refused. A renewal with an empty body reissues the same key.\r\n- The new certificate carries the presented one's subject and every extension forward unchanged, including all four SAN types, key usage, extended key usage and the Puppet OID extensions. So a renewal can neither add nor drop a name or a usage. Only the extensions that must describe the new certificate are set afresh: the authority and subject key identifiers, CRL distribution points, authority information access and basic constraints.\r\n- `allow_subject_alt_names` no longer applies to renewal, whatever its value. It governs only the names a CSR may ask for on a first issuance, which goes through autosign policy or an operator. To change a certificate's names, clean it and sign a new request.\r\n- The docs for `allow_subject_alt_names`, the renewal API and the migration guide say so, and specs check that a re-key CSR asking for a new SAN is renewed without it.\r\n\r\n## What to do\r\n\r\nIf you run with `allow_subject_alt_names: true`, move to a build that includes `02fb61556aa0` (2026-10-13 or later). Then check the certificates issued by renewal for SANs you did not approve, and revoke any you find.\r\n\r\nUntil you can upgrade, set `allow_subject_alt_names: false` unless you need it. With it off, renewal could only carry forward SANs the presented certificate already held.","affected_stack":[{"ecosystem":"Go","package":"github.com/voxpupuli/openvox-ca","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20261013093713-02fb61556aa0"}]}],"fixed":["0.0.0-20261013093713-02fb61556aa0"],"provider":"github-repo-advisories","source":"GHSA-2vpj-96q8-p9j5","relation":"self"}],"affected_other":[],"product_status":[],"records":[{"provider":"github-repo-advisories","source_id":"GHSA-2vpj-96q8-p9j5","relation":"self","url":"https://github.com/voxpupuli/openvox-ca/security/advisories/GHSA-2vpj-96q8-p9j5","license":"GitHub Terms of Service","published_at":"2026-10-13T09:40:48Z","modified_at":"2026-10-13T09:40:48Z","summary":"With allow_subject_alt_names enabled, any enrolled agent can add new DNS SANs at CSR renewal without operator review","details":"Before commit `02fb61556aa0`, with `allow_subject_alt_names: true`, the CSR-body branch of `POST /certificate_renewal` signed whatever DNS SANs the agent asked for, including the Puppet server's own name. The request needed only the agent's own certificate. It didn't go through autosign policy or an operator. The docs presented the setting as risky with autosign. They didn't say that it also let every enrolled node grant itself new names at renewal.\r\n\r\nThe default was safe. The SAN gate added in `145c5b6` (#293) covers every signing path, and with the setting off, renewal could only carry forward SANs the presented certificate already held. This report is about the opt-in.\r\n\r\nFound while re-checking an independent audit (finding A1 at `fb856f1`) against `main` at `145cb53`.\r\n\r\n## Where\r\n\r\nLine numbers are as of `145cb53`, before the fix.\r\n\r\n- `handlePostCertificateRenewal` → `CA.Renew` (`internal/ca/signing.go:1168`) → `signWithDuration(..., presentedCert)` (`signing.go:1297`).\r\n- `checkSubjectAltNames` (`signing.go:585`) built a baseline from the presented certificate's SANs (`:486-489`) plus the certname (`:494`). With the setting on, every requested DNS name passed, and `:589` copied them into the certificate. `issueLeafLocked` always sets EKU `serverAuth, clientAuth`.\r\n- `docs/configuration.md:1318-1360` (\"Subject alternative names requested by a CSR\") explained the impersonation risk only for autosigning and suggested \"a narrow autosign policy alongside it\".\r\n\r\n## Reproduction\r\n\r\nOn a build before the fix, with `allow_subject_alt_names: true` and an agent `agent1.example.com` holding a certificate from this CA:\r\n\r\n```sh\r\nopenssl req -new -newkey rsa:2048 -nodes -keyout evil.key \\\r\n  -subj \"/CN=agent1.example.com\" \\\r\n  -addext \"subjectAltName=DNS:puppet.example.com\" -out evil.csr\r\ncurl --cacert ca_crt.pem --cert agent.crt --key agent.key \\\r\n  -X POST --data-binary @evil.csr \\\r\n  https://puppet.example.com:8140/puppet-ca/v1/certificate_renewal -o new.pem\r\nopenssl verify -CAfile ca_crt.pem -purpose sslserver \\\r\n  -verify_hostname puppet.example.com new.pem\r\n```\r\n\r\nThe last command prints `OK`. The auditors ran the equivalent against `fb856f1`, before the SAN gate existed, and served TLS as the Puppet server with the result.\r\n\r\n## Impact\r\n\r\nAn operator who turned the setting on so a few nodes could carry extra names, and kept manual signing to review them, got no review at renewal. Any compromised node could mint a certificate the whole fleet accepts as the Puppet server and man-in-the-middle catalog delivery, which is code execution on every agent. OpenVox Server has no CSR-based renewal, so its `allow-subject-alt-names` doesn't carry this exposure.\r\n\r\n## Fix\r\n\r\nFixed on `main` on 2026-10-13 in commit [`02fb61556aa0d22de7be4da321d0ab23016ce980`](https://github.com/voxpupuli/openvox-ca/commit/02fb61556aa0d22de7be4da321d0ab23016ce980) (PR #471, closes #469), Go module version `v0.0.0-20261013093713-02fb61556aa0`.\r\n\r\nRenewal now recreates the presented certificate, as OpenVox Server's renewal does, on both paths:\r\n\r\n- A renewal with a CSR body (re-key) takes only the public key from the CSR. Any other subject attributes, SANs or extensions it carries are ignored, not refused. A renewal with an empty body reissues the same key.\r\n- The new certificate carries the presented one's subject and every extension forward unchanged, including all four SAN types, key usage, extended key usage and the Puppet OID extensions. So a renewal can neither add nor drop a name or a usage. Only the extensions that must describe the new certificate are set afresh: the authority and subject key identifiers, CRL distribution points, authority information access and basic constraints.\r\n- `allow_subject_alt_names` no longer applies to renewal, whatever its value. It governs only the names a CSR may ask for on a first issuance, which goes through autosign policy or an operator. To change a certificate's names, clean it and sign a new request.\r\n- The docs for `allow_subject_alt_names`, the renewal API and the migration guide say so, and specs check that a re-key CSR asking for a new SAN is renewed without it.\r\n\r\n## What to do\r\n\r\nIf you run with `allow_subject_alt_names: true`, move to a build that includes `02fb61556aa0` (2026-10-13 or later). Then check the certificates issued by renewal for SANs you did not approve, and revoke any you find.\r\n\r\nUntil you can upgrade, set `allow_subject_alt_names: false` unless you need it. With it off, renewal could only carry forward SANs the presented certificate already held.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","source":"GHSA-2vpj-96q8-p9j5"}],"affected":[{"ecosystem":"Go","package":"github.com/voxpupuli/openvox-ca","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.0-20261013093713-02fb61556aa0"}]}],"fixed":["0.0.0-20261013093713-02fb61556aa0"],"provider":"github-repo-advisories","source":"GHSA-2vpj-96q8-p9j5","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/voxpupuli/openvox-ca/security/advisories/GHSA-2vpj-96q8-p9j5"}]}],"references":[{"type":"ADVISORY","url":"https://github.com/voxpupuli/openvox-ca/security/advisories/GHSA-2vpj-96q8-p9j5"}],"sources":[{"provider":"github-repo-advisories","source_id":"GHSA-2vpj-96q8-p9j5","url":"https://github.com/voxpupuli/openvox-ca/security/advisories/GHSA-2vpj-96q8-p9j5","license":"GitHub Terms of Service","modified_at":"2026-10-13T09:40:48Z","relation":"self"}]}
