Critical libheif Vulnerability Could Enable Remote Code Execution Through WordPress Image Uploads
A flaw in a library used by WordPress lets users upload a crafted image to run code on the server.
Overview
A critical vulnerabilityA flaw in software or hardware that lets an attacker do something the maker did not intend in the libheif library allows authenticatedA person or account that has already signed in with valid credentials users to execute remote code on WordPress sites by uploading a specially crafted HEIC image. The flaw occurs when the library processes mixed-interleave YCbCr data, specifically when it writes two-byteA group of 8 bits, enough to store 1 character width data into a one-byte allocation for the Cr chroma component. This creates a heap-buffer-overflowA buffer overflow inside the pool of memory a program allocates dynamically while running that corrupts memory within the PHP-FPM worker process. Researchers at Fortbridge demonstrated that this corruption can be chained into remote code executionA flaw that lets an attacker run their own code on someone else's computer over a network on specific Ubuntu and Debian environments. The attack requires an account with the upload_files capability, which is typically an Author-level role or higher. Deployments that allow guest uploads or expose the same image-processing route through pluginsAn add-on software module that extends a website, browser, or application with extra features could potentially broaden the risk depending on their configurationA text file that stores settings, network addresses, and options for how a program or server runs.
Terms in this story
- Vulnerability
- A flaw in software or hardware that lets an attacker do something the maker did not intend. Security advisories report a vulnerability when researchers or attackers find a coding mistake in an app or server that allows someone to break in or crash it. Security+ objective 2.3 lists the term
- authenticated
- A person or account that has already signed in with valid credentials. Some vulnerabilities cannot be triggered by a stranger on the internet and instead require an authenticated user who already holds at least a basic account on the system.
- byte
- A group of 8 bits, enough to store 1 character. Memory sizes, network payloads, and buffer lengths are measured in bytes, and memory corruption bugs happen when a program writes even a single byte past the end of its buffer. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
- heap-buffer-overflow
- A buffer overflow inside the pool of memory a program allocates dynamically while running. Attackers exploit a heap overflow in a browser or media parser by feeding it an oversized file that overwrites neighboring objects in memory and hijacks execution.
- buffer-overflow
- A bug where a program writes more data into a fixed memory block than it can hold. When extra input spills past the end of a memory buffer, a buffer overflow can overwrite nearby instructions and let an attacker run their own code. Security+ objective 2.3 lists the term
- Remote Code Execution
- A flaw that lets an attacker run their own code on someone else's computer over a network. This is one of the most dangerous bug classes in the news because an attacker across the internet can send a crafted request and take control of a server.
- code execution
- A flaw that lets an attacker run any commands or program they choose on the target machine. When an advisory warns that a bug allows arbitrary code execution, an attacker who triggers the flaw can install malware, read files, or take over the program's account.
- plugins
- An add-on software module that extends a website, browser, or application with extra features. Small businesses add dozens of third-party plugins to their websites for contact forms or shopping carts, and an unpatched plugin flaw is a common way attackers take over a site.
- configuration
- A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
- PHP's
- A widely used server-side scripting language that builds dynamic web pages before sending them to browsers. Because millions of websites and content management systems run on PHP, a newly discovered vulnerability in the PHP engine can put a huge portion of the web at risk.
- extension
- A small add-on program installed inside a web browser to add features like ad blocking. Because a browser extension can often read and change every web page you visit, attackers buy or hijack legitimate extensions to steal session cookies and passwords.
- bit
- 1 binary digit, a 1 or a 0 (a switch that is on or off). Every file, network packet, and cryptographic key in a computer is stored as a long sequence of bits, and key strength is measured by how many bits the key contains. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the GBHackers website. Cite the article, not this page.
Read the full article on GBHackers (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"A critical heap-buffer-overflow vulnerability in libheif..." Found by reading the article; these exact words are in it - Who is affected: "...authenticated WordPress users..."
Copied word for word from the article - Security+ 2.3 Explain various types of vulnerabilities.
"Critical libheif Vulnerability Could Enable Remote Code Execution Through WordPress..." Found in the headline - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"A critical heap-buffer-overflow vulnerability in libheif could allow authenticated WordPress..." Found in the opening sentences - CYBR 101 week 10: the web, cookies, phishing, incident response and logs
"......Vulnerability Could Enable Remote Code Execution Through WordPress Image Uploads..." Found in the headline - CYBR 101 week 2: the CIA triad, threat actors, risk and CVEs
"Critical libheif Vulnerability Could Enable Remote Code Execution Through WordPress..." Found in the headline
How a story is connected to the course, and every objective, week and job role