DLL hijacking - JitPI.dll
Firefox Nightly on Windows loads a DLL named JitPI.dll from folders listed in the PATH environment variable, allowing an attacker who can write to any such folder to execute code with the victim's privileges when Firefox starts.
Originally disclosed on Mozilla
- Fixed in 13 days
- Paid in 13 days
- Disclosed after 13 days
Created attachment 9476838
JitPI.dll
HI Team, Firefox Nightly Latest on windows is vulnerable for DLL Hijacking which loads the malicious DLL from all the Folders present in the PATH Variables
Attack Scenario:
1. Assume User A and User B works on a machine where User A installed some of their own software and the folder is shared with user B too (can be public folder) and it is in User A env Path
2. Now user B on the machine can place a malicious DLL in this folder with name JitPI.dll
3. When User A Open Firefox NIghtly it will execute the dll and execute code on User A privilege
Steps to reproduce
1. Place the attached dll in any of the Path Variable folder (which you have access)
2. Now simply open firefox nightly
3. It will open calc
Vulnerable DLL name: JitPI.dll
I have attached the poc video and dll file for reference
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, Firefox Nightly searches for JitPI.dll using the PATH environment variable instead of a safe, application-controlled directory, allowing a malicious DLL in a writable PATH folder to be loaded.
Impact
An attacker with write access to a PATH folder could execute arbitrary code with the privileges of another user who launches Firefox Nightly.
What the attacker needed
Windows machine; Firefox Nightly installed; Attacker can write to a PATH folder; Victim launches Firefox
How it was found
- Place the provided DLL in any folder that is in the PATH environment variable and that the attacker can write to.
- Open Firefox Nightly.
- The calculator application opens, demonstrating code execution.
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 starts, Windows can load extra code from shared libraries called DLLs. If the program looks for a DLL in folders that other users can write to, someone else can put a fake DLL there. Then, when the victim opens the program, the fake DLL runs and the attacker's code executes with the victim's permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.