The product, while copying or cloning a resource, does not set the resource's permissions or access control until the copy is complete, leaving the resource exposed to other spheres while the copy is taking place.

Primary

Implementation

Common examples occur in file archive extraction, in which the product begins the extraction with insecure default permissions, then only sets the final permissions (as specified in the archive) once the copy is complete. The larger the archive, the larger the timing window for the race condition.
This weakness has also occurred in some operating system utilities that perform copies of deeply nested directories containing a large number of files.
This weakness can occur in any type of functionality that involves copying objects or resources in a multi-user environment, including at the application level. For example, a document management system might allow a user to copy a private document, but if it does not set the new copy to be private as soon as the copy begins, then other users might be able to view the document while the copy is still taking place.

Confidentiality
Integrity
Read Application Data
Modify Application Data

CVE-2002-0760
Archive extractor decompresses files with world-readable permissions, then later sets permissions to what the archive specified.
https://www.cve.org/CVERecord?id=CVE-2002-0760

CVE-2005-2174
Product inserts a new object into database before setting the object's permissions, introducing a race condition.
https://www.cve.org/CVERecord?id=CVE-2005-2174

CVE-2006-5214
Error file has weak permissions before a chmod is performed.
https://www.cve.org/CVERecord?id=CVE-2006-5214

CVE-2005-2475
Archive permissions issue using hard link.
https://www.cve.org/CVERecord?id=CVE-2005-2475

CVE-2003-0265
Database product creates files world-writable before initializing the setuid bits, leading to modification of executables.
https://www.cve.org/CVERecord?id=CVE-2003-0265

Allowed
This is a Composite of multiple weaknesses that must all occur simultaneously.
While composites are supported in CWE, they have not been a focus of research. There is a chance that future research or CWE scope clarifications will change or deprecate them. Perform root-cause analysis to determine which weaknesses allow this issue to occur, and map to those weaknesses. For example, the delayed permission-setting in the resource copy might be intended functionality, but creation in a location with insecure permissions might not.

Under-studied. It seems likely that this weakness could occur in any situation in which a complex or large copy operation occurs, when the resource can be made available to other spheres as soon as it is created, but before its initialization is complete.

CWE Content Team
MITRE
2008-04-11
Draft 9
2008-04-11

CWE Content Team
MITRE
2008-09-08
updated Applicable_Platforms, Relationships, Other_Notes, Weakness_Ordinalities

CWE Content Team
MITRE
2009-03-10
updated Related_Attack_Patterns

CWE Content Team
MITRE
2010-09-27
updated Relationships

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated References

CWE Content Team
MITRE
2014-06-23
updated Modes_of_Introduction, Other_Notes

CWE Content Team
MITRE
2017-11-08
updated Relationships

CWE Content Team
MITRE
2020-02-24
updated Relationships

CWE Content Team
MITRE
2020-08-20
updated Relationships

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes