CWE-59
Weakness AllowedImproper Link Resolution Before File Access
Abstraction: Base · Status: Draft
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Detection methods
Automated Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Bytecode Weakness Analysis - including disassembler + source code weakness analysis
Effectiveness: SOAR Partial
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Web Application Scanner
Web Services Scanner
Database Scanners
Effectiveness: SOAR Partial
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Fuzz Tester
Framework-based Fuzzer
Effectiveness: SOAR Partial
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Focused Manual Spotcheck - Focused manual analysis of source
Manual Source Code Review (not inspections)
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Source code Weakness Analyzer
Context-configured Source Code Weakness Analyzer
Effectiveness: SOAR Partial
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
Notes
Theoretical
Link following vulnerabilities are Multi-factor Vulnerabilities (MFV). They are the combination of multiple elements: file or directory permissions, filename predictability, race conditions, and in some cases, a design limitation in which there is no mechanism for performing atomic file creation operations.
Some potential factors are race conditions, permissions, and predictability.
Content history
updated Time_of_Introduction
updated Alternate_Terms, Applicable_Platforms, Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings, Weakness_Ordinalities
updated Relationships, Taxonomy_Mappings
updated Relationships
updated Description, Name
updated Background_Details, Other_Notes
updated Potential_Mitigations, Relationships
updated Related_Attack_Patterns
updated Common_Consequences
updated Relationships, Taxonomy_Mappings
updated Common_Consequences, Observed_Examples, References, Relationships
updated Potential_Mitigations
updated Common_Consequences, Other_Notes
updated Detection_Factors, Relationships, Taxonomy_Mappings
updated Relationships
updated Affected_Resources, Applicable_Platforms, Causal_Nature, Common_Consequences, Functional_Areas, Likelihood_of_Exploit, Modes_of_Introduction, Relationships, Taxonomy_Mappings
updated Taxonomy_Mappings
updated Relationships
updated Relationships
updated Relationships
updated Relationships
updated Research_Gaps
updated Relationships
updated Alternate_Terms, Background_Details, Observed_Examples, References, Relationship_Notes, Theoretical_Notes
updated Description
updated Relationships
updated Mapping_Notes
updated Detection_Factors, References
updated Applicable_Platforms, Relationships
updated Alternate_Terms, Name, Observed_Examples
2737 vulnerabilities reference this CWE, most recent first.
GHSA-XW24-F63W-VQ32
Vulnerability from github – Published: 2022-05-14 03:28 – Updated: 2022-05-14 03:28An issue was discovered in certain Apple products. macOS before 10.13.4 is affected. The issue involves the "ATS" component. It allows attackers to obtain sensitive information by leveraging symlink mishandling.
{
"affected": [],
"aliases": [
"CVE-2018-4112"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-04-03T06:29:00Z",
"severity": "MODERATE"
},
"details": "An issue was discovered in certain Apple products. macOS before 10.13.4 is affected. The issue involves the \"ATS\" component. It allows attackers to obtain sensitive information by leveraging symlink mishandling.",
"id": "GHSA-xw24-f63w-vq32",
"modified": "2022-05-14T03:28:57Z",
"published": "2022-05-14T03:28:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-4112"
},
{
"type": "WEB",
"url": "https://support.apple.com/HT208692"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/103582"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1040608"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-XWG2-QC6C-7C3Q
Vulnerability from github – Published: 2022-05-17 05:40 – Updated: 2024-01-19 18:16Fabric before 1.1.0 allows local users to overwrite arbitrary files via a symlink attack on (1) a /tmp/fab.*.tar file or (2) certain other files in the top level of /tmp/.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "fabric"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2011-2185"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": true,
"github_reviewed_at": "2024-01-19T18:16:49Z",
"nvd_published_at": "2011-07-27T02:55:00Z",
"severity": "MODERATE"
},
"details": "Fabric before 1.1.0 allows local users to overwrite arbitrary files via a symlink attack on (1) a `/tmp/fab.*.tar` file or (2) certain other files in the top level of `/tmp/`.",
"id": "GHSA-xwg2-qc6c-7c3q",
"modified": "2024-01-19T18:16:49Z",
"published": "2022-05-17T05:40:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-2185"
},
{
"type": "WEB",
"url": "https://github.com/fabric/fabric/commit/3445b5653cd297039443110548fb3cab2e8e25af"
},
{
"type": "WEB",
"url": "https://github.com/fabric/fabric/commit/d7470d2db919ffcee80c245cf87e6d8d4ba6909c"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=710462"
},
{
"type": "PACKAGE",
"url": "https://github.com/fabric/fabric"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629003"
},
{
"type": "WEB",
"url": "http://code.fabfile.org/projects/fabric/files/Fabric-1.1.0.tar.gz"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2011-July/062534.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2011/06/03/5"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2011/06/06/12"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Fabric vulnerable to symlink attack on tmp files"
}
GHSA-XWQX-RPJH-4W5R
Vulnerability from github – Published: 2022-05-17 05:51 – Updated: 2022-05-17 05:51delqueueask in rccp 0.9 allows local users to overwrite arbitrary files via a symlink attack on the /tmp/cccp_tmp.txt temporary file.
{
"affected": [],
"aliases": [
"CVE-2008-4980"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-11-06T15:55:00Z",
"severity": "MODERATE"
},
"details": "delqueueask in rccp 0.9 allows local users to overwrite arbitrary files via a symlink attack on the /tmp/cccp_tmp.txt temporary file.",
"id": "GHSA-xwqx-rpjh-4w5r",
"modified": "2022-05-17T05:51:55Z",
"published": "2022-05-17T05:51:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-4980"
},
{
"type": "WEB",
"url": "https://bugs.gentoo.org/show_bug.cgi?id=235770"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/496364"
},
{
"type": "WEB",
"url": "http://dev.gentoo.org/~rbu/security/debiantemp/rccp"
},
{
"type": "WEB",
"url": "http://uvw.ru/report.lenny.txt"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/10/30/2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30955"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XWXC-WC23-RVJ5
Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2022-04-29 01:28Netscape Navigator 7.0.2 and Mozilla allows remote attackers to access cookie information in a different domain via an HTTP request for a domain with an extra . (dot) at the end.
{
"affected": [],
"aliases": [
"CVE-2003-1492"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2003-12-31T05:00:00Z",
"severity": "MODERATE"
},
"details": "Netscape Navigator 7.0.2 and Mozilla allows remote attackers to access cookie information in a different domain via an HTTP request for a domain with an extra . (dot) at the end.",
"id": "GHSA-xwxc-wc23-rvj5",
"modified": "2022-04-29T01:28:10Z",
"published": "2022-04-29T01:28:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1492"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11924"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/319919"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/7456"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-XX2R-F4XG-6RG7
Vulnerability from github – Published: 2023-03-29 15:30 – Updated: 2024-03-05 21:30Malwarebytes AdwCleaner 8.4.0 runs as Administrator and performs an insecure file delete operation on C:\AdwCleaner\Logs\AdwCleaner_Debug.log in which the target location is user-controllable, allowing a non-admin user to escalate privileges to SYSTEM via a symbolic link.
{
"affected": [],
"aliases": [
"CVE-2023-28892"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-29T15:15:00Z",
"severity": "HIGH"
},
"details": "Malwarebytes AdwCleaner 8.4.0 runs as Administrator and performs an insecure file delete operation on C:\\AdwCleaner\\Logs\\AdwCleaner_Debug.log in which the target location is user-controllable, allowing a non-admin user to escalate privileges to SYSTEM via a symbolic link.",
"id": "GHSA-xx2r-f4xg-6rg7",
"modified": "2024-03-05T21:30:24Z",
"published": "2023-03-29T15:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-28892"
},
{
"type": "WEB",
"url": "https://forums.malwarebytes.com/topic/307429-release-adwcleaner-841"
},
{
"type": "WEB",
"url": "https://malwarebytes.com"
},
{
"type": "WEB",
"url": "https://www.malwarebytes.com/secure/cves/cve-2023-28892"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XX65-CC7G-9PFP
Vulnerability from github – Published: 2018-10-18 18:05 – Updated: 2021-09-22 18:26Spring Boot supports an embedded launch script that can be used to easily run the application as a systemd or init.d linux service. The script included with Spring Boot 1.5.9 and earlier and 2.0.0.M1 through 2.0.0.M7 is susceptible to a symlink attack which allows the "run_user" to overwrite and take ownership of any file on the same system. In order to instigate the attack, the application must be installed as a service and the "run_user" requires shell access to the server. Spring Boot application that are not installed as a service, or are not using the embedded launch script are not susceptible.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.boot:spring-boot"
},
"ranges": [
{
"events": [
{
"introduced": "1.5.0"
},
{
"fixed": "1.5.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-1196"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T22:04:53Z",
"nvd_published_at": "2018-03-19T18:29:00Z",
"severity": "MODERATE"
},
"details": "Spring Boot supports an embedded launch script that can be used to easily run the application as a systemd or init.d linux service. The script included with Spring Boot 1.5.9 and earlier and 2.0.0.M1 through 2.0.0.M7 is susceptible to a symlink attack which allows the \"run_user\" to overwrite and take ownership of any file on the same system. In order to instigate the attack, the application must be installed as a service and the \"run_user\" requires shell access to the server. Spring Boot application that are not installed as a service, or are not using the embedded launch script are not susceptible.",
"id": "GHSA-xx65-cc7g-9pfp",
"modified": "2021-09-22T18:26:44Z",
"published": "2018-10-18T18:05:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1196"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-xx65-cc7g-9pfp"
},
{
"type": "WEB",
"url": "https://pivotal.io/security/cve-2018-1196"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Moderate severity vulnerability that affects org.springframework.boot:spring-boot"
}
GHSA-XXJ2-P55V-46X5
Vulnerability from github – Published: 2022-05-01 18:45 – Updated: 2022-05-01 18:45Open redirect vulnerability in Menalto Gallery before 2.2.4 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks via a URL in the (1) Core and (2) print modules.
{
"affected": [],
"aliases": [
"CVE-2007-6692"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-01-17T02:00:00Z",
"severity": "MODERATE"
},
"details": "Open redirect vulnerability in Menalto Gallery before 2.2.4 allows remote attackers to redirect users to arbitrary web sites and conduct phishing attacks via a URL in the (1) Core and (2) print modules.",
"id": "GHSA-xxj2-p55v-46x5",
"modified": "2022-05-01T18:45:29Z",
"published": "2022-05-01T18:45:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-6692"
},
{
"type": "WEB",
"url": "http://bugs.gentoo.org/show_bug.cgi?id=203217"
},
{
"type": "WEB",
"url": "http://gallery.menalto.com/gallery_2.2.4_released"
},
{
"type": "WEB",
"url": "http://osvdb.org/41660"
},
{
"type": "WEB",
"url": "http://osvdb.org/41661"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/28898"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200802-04.xml"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation MIT-48.1
Strategy: Separation of Privilege
- Follow the principle of least privilege when assigning access rights to entities in a software system.
- Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
CAPEC-132: Symlink Attack
An adversary positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name.
CAPEC-17: Using Malicious Files
An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.