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().
Last updated
Overview
CWE-560 (Use of umask() with chmod-style Argument) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-560 is exploited.
Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism
Affects: Confidentiality, Integrity, Access Control
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
How to prevent it
Practical mitigations for CWE-560, grouped by where in the lifecycle they apply.
Use umask() with the correct argument.
How to detect it
Automated Static Analysis
If you suspect misuse of umask(), you can use grep to spot call instances of umask().
Frequently asked questions
Common questions about CWE-560.
- What is CWE-560?
- The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod().
- How do you prevent CWE-560?
- Use umask() with the correct argument.
- How is CWE-560 detected?
- Automated Static Analysis: If you suspect misuse of umask(), you can use grep to spot call instances of umask().
- What are the consequences of CWE-560?
- Exploiting CWE-560 can lead to: Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism.
References
- MITRE CWE definition (CWE-560) (opens in a new tab)
- CWE-560 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-560 CVEs
Get an alert when a new CWE-560 CVE affects your products, with AI-written analysis and remediation steps.