CWE-560: Use of umask() with chmod-style Argument

VariantDraft

The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod().

View on MITRE
Back to CWE Lookup

Technical Details

Structure
Simple

Applicable To

Languages
C
Platforms

Frequently Asked Questions

What is CWE-560: Use of umask() with chmod-style Argument?+

CWE-560: Use of umask() with chmod-style Argument is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod().

What are the security consequences of Use of umask() with chmod-style Argument?+

If exploited, CWE-560 (Use of umask() with chmod-style Argument) it can compromise Confidentiality, Integrity and Access Control, leading to outcomes such as Read Files or Directories, Modify Files or Directories and Bypass Protection Mechanism.

How do you prevent or mitigate Use of umask() with chmod-style Argument?+

Recommended mitigations for CWE-560 include: Use umask() with the correct argument. If you suspect misuse of umask(), you can use grep to spot call instances of umask().

Which programming languages are affected by Use of umask() with chmod-style Argument?+

CWE-560 commonly affects C. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-560 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More