Skip to content
File upload Advisory Advanced CVE-2024-7980

Insufficient data validation in Installer (CVE-2024-7980)

The Chromium uninstaller, when run as SYSTEM, creates a temporary file in C:\Windows\Temp with a predictable name. A standard user can create a symbolic link to redirect that file creation to a critical system location, potentially causing denial of service or code execution.

VulnNoob Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 23 days

Steps to reproduce the problem

  1. Install chromium at system level using the command mini_installer.exe --system-level (It can come from SSCM or someone who has administrator access)
  2. Uninstall chromium with SYSTEM account(SCCM or other deployment tools) using the setup.exe available in the install location using the command "C:\Program Files\Chromium\Application\127.0.6533.0\Installer\setup.exe" --uninstall --system-level
  3. Uninstaller creates a file under C:\Windows\Temp on which even standard user(non admin) has write permission.
  4. Using the NtApiDotNet.dll, a symlink can be created without requiring admin access to redirect the file creation to any other system critical resources which will lead to DOS or even code execution can be achieved.

Problem Description

The culprit code is https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/setup/uninstall.cc;l=1120 where the DIR_TEMP results in C:\windows\temp when running as SYSTEM account. The function MoveSetupOutOfInstallFolder is meant for moving the setup.exe and also dlls(in case of component build) to the temporary location which is C:\windows\temp with a temporary name generated using GUID. The another issue is the name can be easily predicted since its being opened and closed. API like FindFirstChangeNotificationA can be used to know the new file name of the setup.exe which is going to be used while moving to C:\Windows\temp. The below POC code can be used to create a symlink. The work required for detecting the file name using FindFirstChangeNotificationA is not done as I am occupied with other things but I can share it in a day or two

Import the NtApiDotNet module

Import-Module ".\NtApiDotNet.dll" -ErrorAction Stop

Define the temporary path and get the Windows directory path using the environment variable

$tempDirectory = [System.IO.Path]::Combine($env:WINDIR, "Temp") $system32Path = [System.IO.Path]::Combine($env:WINDIR, "System32") $outputDllPath = [System.IO.Path]::Combine($system32Path, "drivers\cng1.sys")

Find the file name using FindFirstChangeNotification API and target that file for creating symlink

#$guidDFileName - To do.

Create a mount point

[NtApiDotNet.NtFile]::CreateMountPoint("??$tempDirectory", "\RPC Control", $null)

Create a symbolic link

$outputLink = [NtApiDotNet.NtSymbolicLink]::Create("\RPC Control" + $guidDFileName, "??$outputDllPath")

Additional Comments

This is similar to https://issues.chromium.org/issues/40063745 which allows for permanent DOS but also provides code execution. Not sure if we can do much with setup.exe but with component build, dlls can be used. But can't think of any use case. But its a strong and easy candidate for making machine unbootable leading to permanent DOS

Summary

Chromium arbitrary file create/write and execute vulnerability

Additional Data

Category: Security
Chrome Channel: Stable
Regression: N/A

The original report as published on the Chromium issue tracker, by VulnNoob. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 uninstaller uses a predictable temporary file name in a world-writable directory without validating or securing the file creation, allowing a symbolic link attack.

Impact

This could lead to denial of service by making the machine unbootable, or potentially code execution if DLLs are involved in component builds.

What the attacker needed

Chromium installed at system level; Uninstall run as SYSTEM; Standard user can write to C:\Windows\Temp

How it was found

  1. Install Chromium at system level using the installer with the system-level flag.
  2. Uninstall Chromium as the SYSTEM account using the setup.exe with the uninstall and system-level flags.
  3. Observe that the uninstaller creates a file in C:\Windows\Temp that standard users can write to.
  4. Use a tool to create a symbolic link that redirects the file creation to a critical system resource.

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 runs with high privileges, it sometimes writes temporary files to a shared folder. If a regular user can guess the file name and replace it with a link to another location, the high-privilege program may overwrite important system files. This report shows that the Chromium uninstaller does exactly that, which could break the machine or let an attacker run code.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by VulnNoob

View all

1 more disclosed report, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.