CVE-2022-22719 - Improper Initialization

Severity

75%

Complexity

39%

Confidentiality

60%

A carefully crafted request body can cause a read to a random memory area which could cause the process to crash. This issue affects Apache HTTP Server 2.4.52 and earlier.

CVSS 3.1 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:P).

Demo Examples

Improper Initialization

CWE-665

Here, a boolean initiailized field is consulted to ensure that initialization tasks are only completed once. However, the field is mistakenly set to true during static initialization, so the initialization code is never reached.


               
}
initialized = true;// perform initialization tasks

Improper Initialization

CWE-665

The following code intends to limit certain operations to the administrator only.


               
}
$uid = ExtractUserID($state);
# do stuff
DoAdminThings();

If the application is unable to extract the state information - say, due to a database timeout - then the $uid variable will not be explicitly set by the programmer. This will cause $uid to be regarded as equivalent to "0" in the conditional, allowing the original user to perform administrator actions. Even if the attacker cannot directly influence the state data, unexpected errors could cause incorrect privileges to be assigned to a user just by accident.

Improper Initialization

CWE-665

The following code intends to concatenate a string to a variable and print the string.


               
printf("%s", str);

This might seem innocent enough, but str was not initialized, so it contains random memory. As a result, str[0] might not contain the null terminator, so the copy might start at an offset other than 0. The consequences can vary, depending on the underlying memory.

If a null terminator is found before str[8], then some bytes of random garbage will be printed before the "hello world" string. The memory might contain sensitive information from previous uses, such as a password (which might occur as a result of CWE-14 or CWE-244). In this example, it might not be a big deal, but consider what could happen if large amounts of memory are printed out before the null terminator is found.

If a null terminator isn't found before str[8], then a buffer overflow could occur, since strcat will first look for the null terminator, then copy 12 bytes starting with that location. Alternately, a buffer over-read might occur (CWE-126) if a null terminator isn't found before the end of the memory segment is reached, leading to a segmentation fault and crash.

Overview

First reported 3 years ago

2022-03-14 11:15:00

Last updated 2 years ago

2022-11-02 13:18:00

Affected Software

Apache Software Foundation Apache HTTP Server

Debian Linux 9.0

9.0

Oracle HTTP Server 12.2.1.3.0

12.2.1.3.0

References

https://httpd.apache.org/security/vulnerabilities_24.html

[oss-security] 20220314 CVE-2022-22719: Apache HTTP Server: mod_lua Use of uninitialized value of in r:parsebody

https://httpd.apache.org/security/vulnerabilities_24.html

Vendor Advisory

[oss-security] 20220314 CVE-2022-22719: Apache HTTP Server: mod_lua Use of uninitialized value of in r:parsebody

Mailing List, Third Party Advisory

https://security.netapp.com/advisory/ntap-20220321-0001/

FEDORA-2022-b4103753e9

[debian-lts-announce] 20220322 [SECURITY] [DLA 2960-1] apache2 security update

FEDORA-2022-21264ec6db

FEDORA-2022-78e3211c55

https://security.netapp.com/advisory/ntap-20220321-0001/

Third Party Advisory

FEDORA-2022-b4103753e9

Mailing List, Third Party Advisory

[debian-lts-announce] 20220322 [SECURITY] [DLA 2960-1] apache2 security update

Mailing List, Third Party Advisory

FEDORA-2022-21264ec6db

Third Party Advisory

FEDORA-2022-78e3211c55

Third Party Advisory

https://www.oracle.com/security-alerts/cpuapr2022.html

https://support.apple.com/kb/HT213256

https://support.apple.com/kb/HT213257

https://support.apple.com/kb/HT213255

20220516 APPLE-SA-2022-05-16-2 macOS Monterey 12.4

20220516 APPLE-SA-2022-05-16-4 Security Update 2022-004 Catalina

20220516 APPLE-SA-2022-05-16-3 macOS Big Sur 11.6.6

GLSA-202208-20

FEDORA-2022-21264ec6db

Mailing List, Third Party Advisory

FEDORA-2022-78e3211c55

Mailing List, Third Party Advisory

https://www.oracle.com/security-alerts/cpuapr2022.html

Patch, Third Party Advisory

https://support.apple.com/kb/HT213256

Third Party Advisory

https://support.apple.com/kb/HT213257

Third Party Advisory

https://support.apple.com/kb/HT213255

Third Party Advisory

20220516 APPLE-SA-2022-05-16-2 macOS Monterey 12.4

Mailing List, Third Party Advisory

20220516 APPLE-SA-2022-05-16-4 Security Update 2022-004 Catalina

Mailing List, Third Party Advisory

20220516 APPLE-SA-2022-05-16-3 macOS Big Sur 11.6.6

Mailing List, Third Party Advisory

GLSA-202208-20

Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.