Amazon Linux AMI : exim (ALAS-2022-1622)

critical Nessus Plugin ID 163870

Synopsis

The remote Amazon Linux AMI host is missing a security update.

Description

The version of exim installed on the remote host is prior to 4.92-1.33. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS-2022-1622 advisory.

- Exim 4 before 4.94.2 allows Execution with Unnecessary Privileges. Because Exim operates as root in the log directory (owned by a non-root user), a symlink or hard link attack allows overwriting critical root- owned files anywhere on the filesystem. (CVE-2020-28007)

- Exim 4 before 4.94.2 allows Execution with Unnecessary Privileges. Because Exim operates as root in the spool directory (owned by a non-root user), an attacker can write to a /var/spool/exim4/input spool header file, in which a crafted recipient address can indirectly lead to command execution. (CVE-2020-28008)

- Exim 4 before 4.94.2 allows Integer Overflow to Buffer Overflow because get_stdinput allows unbounded reads that are accompanied by unbounded increases in a certain size variable. NOTE: exploitation may be impractical because of the execution time needed to overflow (multiple days). (CVE-2020-28009)

- Exim 4 before 4.94.2 allows Out-of-bounds Write because the main function, while setuid root, copies the current working directory pathname into a buffer that is too small (on some common platforms).
(CVE-2020-28010)

- Exim 4 before 4.94.2 allows Heap-based Buffer Overflow in queue_run via two sender options: -R and -S.
This may cause privilege escalation from exim to root. (CVE-2020-28011)

- Exim 4 before 4.94.2 allows Exposure of File Descriptor to Unintended Control Sphere because rda_interpret uses a privileged pipe that lacks a close-on-exec flag. (CVE-2020-28012)

- Exim 4 before 4.94.2 allows Heap-based Buffer Overflow because it mishandles -F '.(' on the command line, and thus may allow privilege escalation from any user to root. This occurs because of the interpretation of negative sizes in strncpy. (CVE-2020-28013)

- Exim 4 before 4.94.2 allows Execution with Unnecessary Privileges. The -oP option is available to the exim user, and allows a denial of service because root-owned files can be overwritten. (CVE-2020-28014)

- Exim 4 before 4.94.2 has Improper Initialization that can lead to recursion-based stack consumption or other consequences. This occurs because use of certain getc functions is mishandled when a client uses BDAT instead of DATA. (CVE-2020-28019)

- Exim 4 before 4.94.2 has Improper Restriction of Write Operations within the Bounds of a Memory Buffer.
This occurs when processing name=value pairs within MAIL FROM and RCPT TO commands. (CVE-2020-28022)

- Exim 4 before 4.94.2 allows Out-of-bounds Read. smtp_setup_msg may disclose sensitive information from process memory to an unauthenticated SMTP client. (CVE-2020-28023)

- Exim 4 before 4.94.2 allows Buffer Underwrite that may result in unauthenticated remote attackers executing arbitrary commands, because smtp_ungetc was only intended to push back characters, but can actually push back non-character error codes such as EOF. (CVE-2020-28024)

- Exim 4 before 4.94.2 allows Out-of-bounds Read because pdkim_finish_bodyhash does not validate the relationship between sig->bodyhash.len and b->bh.len; thus, a crafted DKIM-Signature header might lead to a leak of sensitive information from process memory. (CVE-2020-28025)

- Exim 4 before 4.94.2 has Improper Neutralization of Line Delimiters, relevant in non-default configurations that enable Delivery Status Notification (DSN). Certain uses of ORCPT= can place a newline into a spool header file, and indirectly allow unauthenticated remote attackers to execute arbitrary commands as root. (CVE-2020-28026)

- Exim 4 before 4.94.2 has Execution with Unnecessary Privileges. By leveraging a delete_pid_file race condition, a local user can delete arbitrary files as root. This involves the -oP and -oPX options.
(CVE-2021-27216)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update exim' to update your system.

See Also

https://alas.aws.amazon.com/ALAS-2022-1622.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28007.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28008.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28009.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28010.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28011.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28012.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28013.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28014.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28019.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28022.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28023.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28024.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28025.html

https://alas.aws.amazon.com/cve/html/CVE-2020-28026.html

https://alas.aws.amazon.com/cve/html/CVE-2021-27216.html

Plugin Details

Severity: Critical

ID: 163870

File Name: ala_ALAS-2022-1622.nasl

Version: 1.4

Type: local

Agent: unix

Published: 8/5/2022

Updated: 10/16/2023

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 9.3

Temporal Score: 7.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2020-28026

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:exim, p-cpe:/a:amazon:linux:exim-debuginfo, p-cpe:/a:amazon:linux:exim-greylist, p-cpe:/a:amazon:linux:exim-mon, p-cpe:/a:amazon:linux:exim-mysql, p-cpe:/a:amazon:linux:exim-pgsql, cpe:/o:amazon:linux

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 7/28/2022

Vulnerability Publication Date: 5/6/2021

Reference Information

CVE: CVE-2020-28007, CVE-2020-28008, CVE-2020-28009, CVE-2020-28010, CVE-2020-28011, CVE-2020-28012, CVE-2020-28013, CVE-2020-28014, CVE-2020-28019, CVE-2020-28022, CVE-2020-28023, CVE-2020-28024, CVE-2020-28025, CVE-2020-28026, CVE-2021-27216

IAVA: 2021-A-0216-S