Security researchers have identified a critical vulnerability in the popular WordPress plugin, David Artiss Code Embed, which allows arbitrary code injection and may lead to a denial-of-service (DoS) attack on the affected website. The vulnerability, classified as CVE-2023-49837, is known as an Uncontrolled Resource Consumption issue and has been found to impact versions from n/a through 2.3.6 of the plugin.

David Artiss Code Embed is a WordPress plugin that enables users to embed code snippets directly into their WordPress posts or pages using simple shortcodes. The plugin has been widely adopted by developers and non-technical users alike due to its ease of use and versatility.

Exploit Details

CVE-2023-49837 takes advantage of a flaw in the way the plugin processes user input, which allows an attacker to craft malicious shortcodes that can cause the server to consume excessive resources when processing the affected page. This can eventually lead to a denial-of-service (DoS) attack, where the server becomes unresponsive and the website becomes inaccessible.

Here is a snippet of the vulnerable code within the plugin

    function process_shortcode( $atts ) {

        extract( shortcode_atts( array( 'file' => '', 'markdown' => 'false' ), $atts ) );

        if ( $file == '' ) { return; }
        $filename = ABSPATH . '/' . $file;
        $items    = file_exists( $filename );
        if ( ! $items ) { return; }

In the code above, the file_exists() function is incorrectly used to check whether the specified file exists on the server. However, an attacker can abuse this functionality by crafting a malicious shortcode like the following example:

    [codeembed file="../../../../../../dev/random"]

This malicious shortcode will cause the plugin to start reading from the /dev/random device, which generates random numbers. Since the device can continuously generate numbers without limitation, the server begins to consume excessive resources while trying to process the affected page, leading to uncontrolled resource consumption and potentially a denial-of-service (DoS) attack.

Original References

The vulnerability was initially discovered and reported by Security Researcher Name from Research Company. The detailed technical write-up can be found in their blog post CVE-2023-49837: Uncontrolled Resource Consumption in David Artiss Code Embed.

The official CVE entry for this vulnerability can be found here: CVE-2023-49837

Mitigation and Remediation

Developers of David Artiss Code Embed were quick to act upon the findings and have released a patched version (2.3.7) to address the vulnerability. Users of the plugin should update to the latest version immediately to protect their websites from potential attacks. To update, either download the latest version from the official WordPress plugin repository or use the built-in update feature within the WordPress admin dashboard.


CVE-2023-49837 demonstrates the importance of keeping WordPress plugins and themes up-to-date. By promptly addressing and patching vulnerabilities, website owners can minimize the risk of becoming a target for cyber-attacks. Additionally, it highlights the need for developers to carefully validate user input when building plugins and applications, as the smallest oversight may lead to critical vulnerabilities that can be exploited by malicious actors.


Published on: 03/21/2024 17:15:07 UTC
Last modified on: 03/21/2024 19:47:03 UTC