Skip to content

CWE-732: Incorrect Permission Assignment for Critical Resource

ClassLikelihood of exploit: High

The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

When a resource is given a permission setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution, or sensitive user data. For example, consider a misconfigured storage account for the cloud that can be read or written by a public or anonymous user.

Consequences

  • Confidentiality: Read Application Data, Read Files or Directories
  • Access Control: Gain Privileges or Assume Identity
  • Integrity, Other: Modify Application Data, Other

How to prevent it

  • Implementation: When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
  • Architecture and Design, Operation: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Implementation, Installation: During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
  • System Configuration: For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
  • Documentation: Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
  • Installation: Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

Recent advisories

  • GHSA-6627-m3xw-93mp — filelock: StrictSoftFileLock creates its claim directories without the lock mode, so another local user with a write bit on them can end a live hold
  • GHSA-8mx5-7m5m-r77g — filelock: WindowsFileLock ignores mode: a 0o600 lock file and the ReadWriteLock database inherit the directory ACL
  • GHSA-4596-2p6p-28cv — MCP Atlassian: Insecure File Permissions on OAuth Token Storage
  • GHSA-98xx-8mx4-x7cm — vm2 NodeVM can replace the host process TLS trust store
  • GHSA-m5w8-4gq2-6f8x — vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host (sibling class of GHSA-9g8x-92q2-p28f)
  • GHSA-945v-v9p3-v5xw — rclone local `--metadata` applies attacker-controlled mode/uid - setuid binary planted from an untrusted remote
  • GHSA-q9pg-jj6x-j9p6 — Gitea: draft release attachment disclosure via missing web authorization
  • GHSA-3fcv-jvfp-m4q9 — Cilium vulnerable to sensitive information disclosure and cluster disruption via local Envoy admin socket access
  • GHSA-777r-4v59-6486 — Gitea: Permanent Fork PR Workflow Approval Gate Bypass
  • GHSA-rwp6-7w3q-75fq — OpenClaw: Config recovery could restore openclaw.json with broad file permissions
  • GHSA-p2fh-f5fc-44hr — OpenClaw: memory-wiki ingest could read local files with operator.write scope
  • GHSA-qf5v-m7p4-95rp — Fission: Incomplete capability denylist in Environment/Function PodSpec validation allows tenant-added CAP_SYS_TIME and cross-tenant node wall-clock corruption
  • GHSA-5hgf-628x-mcqf — uutils coreutils has an Incorrect Permission Assignment for Critical Resource
  • GHSA-p5x9-j974-rpfp — Grafana legacy correlations allow cross-tenant disclosure and deletion
  • GHSA-5fc7-f62m-8983 — OpenClaw: Feishu docx upload_file/upload_image Bypasses Workspace-Only Filesystem Policy (GHSA-qf48-qfv4-jjm9 Incomplete Fix)

All advisories for CWE-732

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor