Skip to content

Incorrect permission assignment for symlinked files used in copy or archiving operations

Low
ljacomet published GHSA-43r3-pqhv-f7h9 Oct 4, 2023

Package

Gradle (Java)

Affected versions

<7.6.3, <8.4

Patched versions

7.6.3, 8.4

Description

Impact

When copying files or creating archives, Gradle does not preserve symbolic links. Instead, Gradle resolves symbolic links to their underlying target file. The permissions of the new file are the permissions of the symbolic link instead of the permissions of the target file.

This can lead to files that have unintended permissions because symbolic links are usually world readable and writeable.

While it is unlikely this impacts the build directly, it may open attack vectors where build artifacts are used or extracted.

Patches

In Gradle 7.6.3 and 8.4, the permissions of the target file will be used when copying or archiving a symbolic link.

It is recommended that users upgrade to a patched version.

Workarounds

If you are unable to upgrade to a patched Gradle version, you should explicitly set permissions for any symbolic links when copying or creating an archive.

References

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N

CVE ID

CVE-2023-44387

Weaknesses

Incorrect Permission Assignment for Critical Resource

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

Credits