KiCad Project Archive File Handling Directory Traversal Remote Code Execution Vulnerability
KiCad did not properly validate a user-supplied path when handling project archive files, allowing a crafted archive to write files outside the intended directory. An attacker could use this to execute arbitrary code as the current user if the victim opens a malicious archive.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of KiCad. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the archive extraction code joined user-controlled entry names to a destination path without checking for path traversal sequences, allowing files to be written outside the intended directory.
Impact
An attacker could execute arbitrary code in the context of the current user, but the victim must first visit a malicious page or open a malicious file.
What the attacker needed
Victim opens a malicious archive; user interaction required
The fix
KiCad issued an update to correct this vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program unpacks an archive, it should only write files inside the folder it created. Here, a specially crafted archive could make KiCad write files somewhere else on the computer. If an attacker places a harmful file in a location that gets run automatically, they could run their own code on the victim's machine.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.