Certificate output directories created with mode 0777 #28
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
mod-nag
mod-nag
mod-nag
mod-nag/ignore
mod-nag/ignore
mod-nag/ignore
nagonag
nagonag/ignore
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/cert-proxy#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
internal/shared/mkdir.go:10creates directories with mode0777:A typical umask of
022reduces this to0755(world-readable and world-executable). Certificate subdirectories holding private key files should not be world-accessible.Impact
Any local user can list the contents of the cert output directories. Combined with a permissive umask, the actual
privkey.pemfiles inside may also be readable if their own permissions are misconfigured.Fix
Use mode
0700(or at minimum0750) for directories that hold certificate material:AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex