CWE-560: Use of umask() with chmod-style Argument | Glexia
CWE-560 (Use of umask() with chmod-style Argument) weakness overview with consequences, detection methods, mitigations, related CVEs and MITRE ATT&CK context.
Glexia's Take · Automated analysis
CWE-560: Use of umask() with chmod-style Argument
Use of umask() with chmod-style Argument represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Executive Impact
- Confidentiality,Integrity,Access Control: Read Files or Directories,Modify Files or Directories,Bypass Protection Mechanism
Developer Pattern
CWE-560 is the kind of defect developers can usually prevent with explicit validation, safer framework defaults, and tests that exercise hostile input or unsafe state transitions.
Automation confidence
high confidence from CWE-560, 4.20.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Official CWE Definition
CWE-560: Use of umask() with chmod-style Argument
The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod().
Developer And Remediation Guidance
How teams prevent and detect this weakness
Causes
- Missing validation
- Unsafe defaults
- Insufficient authorization or memory-safety invariant
Remediation
- Implementation: Use umask() with the correct argument.
Detection
- Automated Static Analysis: If you suspect misuse of umask(), you can use grep to spot call instances of umask().
Mappings
Related CVEs, CWEs, and ATT&CK context
ATT&CK Relevance
ATT&CK relevance is shown only when reviewed or responsibly inferred.
