---
title: "CWE-560: Use of umask() with chmod-style Argument"
url: https://radicalnotion.ai/cwe/cwe-560
type: cwe
description: "The product calls umask() with an incorrect argument that is specified as if it is an argument to chmod()."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

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

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 0
- **Of those, in CISA KEV:** 0
- **New in 2026:** 0
- **CWE catalog version:** 4.21

## Description

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

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** C (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Access Control | Read Files or Directories, Modify Files or Directories, Bypass Protection Mechanism | - |

## Potential mitigations

### Implementation

Use umask() with the correct argument.

## Detection methods

### Automated Static Analysis

If you suspect misuse of umask(), you can use grep to spot call instances of umask().

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-687](https://radicalnotion.ai/cwe/cwe-687) | Function Call With Incorrectly Specified Argument Value |

## Frequently asked questions

### 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.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/560.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-560). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
