NGINX: Out-of-bounds Write
CVE-2022-41741 is a high-severity out-of-bounds write vulnerability in NGINX from F5, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 1.23.2, 1.22.1 as the first without the flaw, so updating NGINX to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.81% chance of exploitation within 30 days, higher than 58% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update NGINX to 1.23.2 or 1.22.1, whichever matches your release line, or a later version.
- Update NGINX Plus to R27-p1 or R26-p1, whichever matches your release line, or a later version.
- Update NGINX Open Source Subscription to R2 P1 or R1 P1, whichever matches your release line, or a later version.
- Read the advisory on support.f5.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| F5 | NGINX | Mainline up to, but not including, 1.23.2; Stable up to, but not including, 1.22.1 | 1.23.2, 1.22.1 |
| F5 | NGINX Plus | R27 up to, but not including, R27-p1; R1 up to, but not including, R26-p1 | R27-p1, R26-p1 |
| F5 | NGINX Open Source Subscription | R2 up to, but not including, R2 P1; R1 up to, but not including, R1 P1 | R2 P1, R1 P1 |
| F5 | Nginx Ingress Controller | 1.9.0 through 1.12.4; 2.0.0 through 2.4.0 | Not stated |
| Fedora Project | Fedora | 35; 36; 37 | Not stated |
| Debian | Debian Linux | 10.0; 11.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.0 | High | CNA (f5.com) |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
How developers prevent this class of flaw
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega, and the Strsafe.h library from Microsoft. These libraries provide safer versions of overflow-prone string-handling functions.
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- support.f5.com/csp/article/K81926432Mitigation
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2022/11/msg00031.htmlMailing List, Third Party Advisory
- security.netapp.com/advisory/ntap-20230120-0005/Third Party Advisory
- debian.org/security/2022/dsa-5281Third Party Advisory
Other references
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPRVYA4FS34VWB4FEFYN…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FD6M3PVVKO35WLAA7GLD…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WBORRVG7VVXYOAIAD64Z…
Other vulnerabilities in NGINX
- 7.5 High severity
HTTP/2 Rapid Reset Attack Exploited
- 7.1 High severity
Recent Out-of-bounds Write vulnerabilities
- 7.0 High severity
- 9.1 Critical severity
- 7.8 High severity
- 9.8 Critical severity
- 8.8 High severity
- 7.8 High severity
Spotted an error? Tell us.