Exécuter une analyse statique (SAST) sur le code source à la recherche du motif non sécurisé dans le flux de données.
Windows Shortcut Following (.LNK)
This vulnerability occurs when an application opens a file or directory without properly validating that it is a Windows shortcut (.LNK). If the shortcut's target points to a location outside the…
What is CWE-64?
Real-world CVEs caused by CWE-64
-
network access control service executes program with high privileges and allows symlink to invoke another executable or perform DLL injection.
-
Mail client allows remote attackers to bypass the user warning for executable attachments such as .exe, .com, and .bat by using a .lnk file that refers to the attachment, aka "Stealth Attachment."
-
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
-
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
-
Browser allows remote malicious web sites to overwrite arbitrary files by tricking the user into downloading a .LNK (link) file twice, which overwrites the file that was referenced in the first .LNK file.
-
".LNK." - .LNK with trailing dot
-
Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link
Parcours de l'attaquant étape par étape
- 1
Identifier un chemin de code qui traite des entrées non fiables sans validation.
- 2
Élaborer une charge utile qui exploite le comportement non sécurisé — injection, traversal, débordement ou abus de logique.
- 3
Délivrer la charge utile via une requête normale et observer la réaction de l'application.
- 4
Itérer jusqu'à ce que la réponse divulgue des données, exécute le code de l'attaquant ou élève les privilèges.
Vulnerable pseudo
MITRE n'a pas publié d'exemple de code pour ce CWE. Le motif ci-dessous est illustratif — voir Ressources pour les références canoniques.
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
// Untrusted input flows directly into the sensitive sink.
return executeUnsafe(input);
} Secure pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
const safe = validateAndEscape(input);
return executeWithGuards(safe);
} How to prevent CWE-64
- Architecture and Design 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.
How to detect CWE-64
Exécuter des tests de sécurité applicative dynamique (DAST) contre le point de terminaison en ligne.
Surveiller les journaux runtime pour détecter des traces d'exception inhabituelles, des entrées malformées ou des tentatives de contournement d'autorisation.
Revue de code : signaler tout nouveau code qui traite les entrées de cette surface sans utiliser les helpers du framework validés.
Plexicus détecte automatiquement CWE-64 et ouvre une PR de correction en moins de 60 secondes.
Codex Remedium analyse chaque commit, identifie cette faiblesse précise et livre une pull request prête à être relue avec le correctif. Pas de tickets. Pas de transferts.
Frequently asked questions
Qu'est-ce que CWE-64 ?
This vulnerability occurs when an application opens a file or directory without properly validating that it is a Windows shortcut (.LNK). If the shortcut's target points to a location outside the application's intended security boundary, an attacker can trick the software into accessing unauthorized files.
Quelle est la gravité de CWE-64 ?
MITRE évalue la probabilité d'exploitation comme Faible — l'exploitation est rare, mais la faiblesse doit tout de même être corrigée lorsqu'elle est découverte.
Quels langages ou plateformes sont affectés par CWE-64 ?
MITRE lists the following affected platforms: Windows.
Comment puis-je prévenir CWE-64 ?
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.
Comment Plexicus détecte et corrige CWE-64 ?
Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-64 à chaque commit. Lorsqu'une correspondance est trouvée, notre agent Codex Remedium ouvre une PR de correction avec le code corrigé, les tests et un résumé d'une ligne pour le relecteur.
Où puis-je en savoir plus sur CWE-64 ?
MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/64.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.
Weaknesses related to CWE-64
Improper Link Resolution Before File Access ('Link Following')
This vulnerability occurs when an application uses a filename to access a file but fails to properly check if that name points to a…
Insecure Operation on Windows Junction / Mount Point
This vulnerability occurs when a Windows application opens a file or directory without properly validating that the path is not a symbolic…
UNIX Symbolic Link (Symlink) Following
This vulnerability occurs when a software application opens files or directories without properly checking if they are symbolic links…
UNIX Hard Link
This vulnerability occurs when an application opens a file or directory without verifying if the name points to a hard link that leads…
Windows Hard Link
This vulnerability occurs when a Windows application opens a file or directory without properly verifying if the path points to a hard…
Arrêtez de payer par développeur.
Commencez à fermer la boucle.
Plexicus est l'ASPM natif IA qui scanne, filtre, corrige, penteste et explique — de façon autonome. Développeurs illimités, dépôts illimités, actions IA à usage équitable. Vrai niveau gratuit, €269/mo annuel quand vous êtes prêt.