Out-of-bounds write in F5 NGINX ngx_http_mp4_module can corrupt worker memory

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2022-41741?

CVE-2022-41741 is a vulnerability classified as Out-of-bounds Write, affecting NGINX (affected versions: Mainline – < 1.23.2 and Stable – < 1.22.1), NGINX Plus (affected versions: R27 – < R27-p1 and R1 – < R26-p1), and NGINX Open Source Subscription (affected versions: R2 – < R2 P1 and R1 – < R1 P1). This vulnerability is rated High, with a CVSS score of 7.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

NGINX Open Source before versions 1.23.2 and 1.22.1, NGINX Open Source Subscription before versions R2 P1 and R1 P1, and NGINX Plus before versions R27 P1 and R26 P1 have a vulnerability in the module ngx_http_mp4_module that might allow a local attacker to corrupt NGINX worker memory, resulting in its termination or potential other impact using a specially crafted audio or video file. The issue affects only NGINX products that are built with the ngx_http_mp4_module, when the mp4 directive is used in the configuration file. Further, the attack is possible only if an attacker can trigger processing of a specially crafted audio or video file with the module ngx_http_mp4_module.

Affected products and scope

The issue affects only products built with ngx_http_mp4_module when the mp4 directive is used and an attacker can trigger processing of a specially crafted media file.

  • NGINX Open Source: Mainline before 1.23.2 and Stable before 1.22.1 are marked affected.
  • NGINX Open Source Subscription: R2 before R2 P1 and R1 before R1 P1 are marked affected.
  • NGINX Plus: R27 before R27-p1 is marked affected. The description identifies the other NGINX Plus boundary as before R26 P1, while the structured affected data labels the branch R1 with lessThan R26-p1; verify this branch label against F5 inventory and advisory data.
  • Debian: The Debian bullseye security advisory states that the module is enabled only in the nginx-extras binary package and identifies 1.18.0-6.1+deb11u3 as the fixed package version.

Technical details

F5 NGINX has an out-of-bounds write in ngx_http_mp4_module. A local attacker may provide or cause NGINX to process a specially crafted audio or video file, which can corrupt NGINX worker memory. The required conditions are that the product is built with ngx_http_mp4_module, the configuration uses the mp4 directive, and the attacker can trigger the relevant file-processing path. The issue therefore affects deployments meeting these conditions rather than every NGINX installation. The specific parsing operation, overwrite location, and any transition from memory corruption to another impact are not established by the available description.

Exploitability

The vulnerability is locally reachable and is not described as a direct network attack. The attacker must have sufficient local access to place or otherwise introduce a specially crafted file into the processing path, or to trigger its processing. The normalized record describes low required privileges and no user interaction. Attack complexity is not consistent across the supplied assessments: NVD records low complexity, while the F5 assessment and FIRST example emphasize additional host-side preparation. The supplied record marks public exploit as false, but it does not establish the real-world exploitation status.

Technical impact

The flaw can write beyond a valid memory boundary in an NGINX worker while the module processes a media file. Worker termination is the documented outcome; additional effects are possible, but the available evidence does not prove a particular path to disclosure, integrity loss, or code execution. The resulting service interruption can affect media requests and potentially other requests handled by the same worker process. Confidentiality and integrity consequences should be assessed as possible risks, not treated as evidence of a breach or arbitrary code execution. Only deployments satisfying the build, configuration, and attacker-triggered processing conditions are within the described affected scope.

Business impact

The direct operational consequence can be NGINX worker termination, causing request-processing disruption, reduced service capacity, or unexpected service restarts. If the memory corruption affects state or data handled by the process, confidentiality and integrity could also be at risk, but the F5 description does not confirm a specific disclosure or code-execution scenario for this record. A Debian security advisory describes MP4 parsing flaws in the same module as potentially causing denial of service, memory disclosure, or potential code execution; because that advisory groups multiple issues, those broader outcomes should be treated as possible module-level consequences rather than uniquely confirmed results here. The operational scope is limited to systems that include the module, use the mp4 directive, and allow an attacker to trigger file processing.

Remediation

  1. Upgrade by product branch: upgrade NGINX Open Source Mainline to 1.23.2 or the F5-confirmed fix for that branch, and upgrade NGINX Open Source Stable to 1.22.1 or the corresponding branch fix.
  2. For NGINX Open Source Subscription, upgrade the R2 branch to R2 P1 and the R1 branch to R1 P1.
  3. For NGINX Plus, upgrade the R27 branch to R27 P1 and the branch corresponding to R26 to R26 P1. Because the structured affected data uses an inconsistent label for the R26-p1 boundary, verify the product mapping before deployment.
  4. For Debian bullseye, install the fixed package 1.18.0-6.1+deb11u3 or the corresponding Debian security update.
  5. If an upgrade cannot be completed immediately, first verify whether the module is built and used. Stopping use of the mp4 directive or deploying a build without ngx_http_mp4_module may remove the stated prerequisite, but the record does not provide a separately confirmed vendor workaround beyond updating.

Detection

  1. Inventory F5 NGINX, NGINX Plus, and NGINX Open Source Subscription deployments, recording the exact product branch and installed build.
  2. Verify whether the binary or package was built with ngx_http_mp4_module.
  3. Review configuration files for the mp4 directive, then identify webroots, endpoints, or workflows that can cause NGINX to process audio or video files.
  4. Review permissions for local accounts that can place files in a processed location or trigger media processing.
  5. Check logs and monitoring for NGINX worker termination, unexpected worker restarts, or processing errors associated with media files. This is precautionary monitoring, not a source-confirmed indicator of compromise; the absence of such evidence does not prove that a system is safe.
Sources (25)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.