AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 52 Bitcoin

set restrictive unix umask application-wide by default

Public commit record

What the developer wrote

Authored by SomberNight

93/100 · Strong
set restrictive unix umask application-wide by default

- I noticed we were creating the RPC server unix domain socket with 0o775.
Instead of hunting down each individual line we create files/dirs, we should
just set a restrictive umask by default. We can still use chmod to relax this
for individual files. -- but we should try to be secure by default
- note: bitcoin core does the same
https://github.com/bitcoin/bitcoin/blame/2fe76ed8324af44c985b96455a05c3e8bec0a03e/src/common/system.cpp#L92
- the umask is set in run_electrum as opposed to __init__.py so that we don't side-effect use-cases where electrum is imported as a library
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change makes Electrum create files and folders with stricter default permissions, so other users on the same computer cannot read or modify them. The developer noticed the RPC socket was being created with overly permissive permissions (0o775, meaning group members had full access), and decided to tighten the default for all files rather than fixing each case individually. It is a proactive hardening patch, not a fix for a reported exploit.

Recommended action

Treat as a worthwhile hardening commit. Review whether any remaining explicit chmod/0o775 calls are still intentional and necessary, and verify that the RPC socket and other sensitive files now receive owner-only permissions on supported platforms. No urgent incident response is indicated.

Security signals we found

01

Hardening: restrictive default umask applied application-wide

02

Information-disclosure/pre-auth risk: RPC unix socket previously created with group-writable 0o775

03

Proactive fix: no CVE or exploit chain described in commit

04

Scope limitation: umask set only in run_electrum, not in library import path

Risk score

Why this scored 52/100

Our methodology →
Potential impact 12/30
Exploitability 10/25
Stealth signal 8/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.