Restrict global settings and disable public registration by default

fix(security): restrict global settings and disable public registration by default
Restrict global settings and disable public registration by defaultd10b1b-fix-restrict-global-settings-and-disable-public-cve-2026-58473fixrestrict global settings disable public registration

Committed by aniruddhaadak80

commit message
fix(security): restrict global settings and disable public registration by default

- Require superuser privileges for POST /api/v1/settings
- Fully mask LLM and VectorDB API keys in GET /api/v1/settings
- Add COGNEE_PUBLIC_REGISTRATION_ENABLED environment variable to disable public self-registration (defaults to true but can be disabled)
 
Closes #3084
 
Signed-off-by: Aniruddha Adak <[email protected]>

Editor assessment

This commit patches CVE-2026-58473. The subject clearly states two hardening outcomes, restricting global settings and disabling public registration by default, and the `security` scope correctly frames the work. The body lists three concrete changes, including superuser gating on the settings endpoint and masking API keys, with a proper `Closes #3084` footer and sign-off. Those details are useful, but they list what changed rather than why the endpoints were dangerous. A contradiction is worth flagging: the subject claims public registration is disabled by default while the body says the new flag defaults to true. That inconsistency undermines trust in the summary and keeps an otherwise solid message from the upper tier.

Browse categories

More fix examples · Back to search