cve.bz

CVE-2021-3997 Uncontrolled Recursion

5.5 mediumExploit referenceEPSS 1.7%Fix available

Medium (5.5). EPSS 1.7% estimated probability of exploitation activity in the next 30 days.

On this page
A flaw was found in systemd. An uncontrolled recursion in systemd-tmpfiles may lead to a denial of service at boot time when too many nested directories are created in /tmp.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
1.7% (unchanged from 1.7% a week ago; 1.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 78th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-674 Uncontrolled Recursion
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3997 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3997?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3997?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3997 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2021-3997

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2021-3997](https://cve.bz/cve/badge/CVE-2021-3997.svg)](https://cve.bz/cve/CVE-2021-3997)

HTML:

<a href="https://cve.bz/cve/CVE-2021-3997"><img src="https://cve.bz/cve/badge/CVE-2021-3997.svg" alt="CVE-2021-3997"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
systemd_project:systemdfrom 240 before 250.2
fedoraproject:fedora34
fedoraproject:fedora35
redhat:enterprise_linux7.0
redhat:enterprise_linux8.0
redhat:enterprise_linux9.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14systemd250.2-1DEBIAN-CVE-2021-3997
Ubuntu20.04:LTSsystemd245.4-4ubuntu3.15UBUNTU-CVE-2021-3997 USN-5226-1
UbuntuPro:14.04:LTS, Pro:16.04:LTS, Pro:18.04:LTSsystemdno fix listedUBUNTU-CVE-2021-3997
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3systemd246.16-150300.7.39.1SUSE-SU-2022:0539-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3systemd246.16-7.33.1SUSE-SU-2022:0043-1
SUSEPackage Hub 15 SP3htmldoc1.9.12-bp153.2.6.1openSUSE-SU-2022:0043-1
openSUSELeap 15.3htmldoc1.9.12-bp153.2.6.1openSUSE-SU-2022:0043-1
openSUSELeap 15.3systemd246.16-150300.7.39.1openSUSE-SU-2022:0539-1
openSUSELeap 15.3systemd246.16-7.33.1openSUSE-SU-2022:0043-1
openSUSETumbleweedsystemd249.7-3.1openSUSE-SU-2024:11731-1
Azure Linux2systemd250.3-21AZL-10638

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Enterprise Linux 8 has a default 1024 nofile limit, thus preventing `systemd-tmpfiles` from exhausting its stack and crashing. For this reason, this flaw has been rated as having a security impact of Low on Red Hat Enterprise Linux 8. For more information on default ulimit values, please see https://access.redhat.com/solutions/4482841.

The systemd version of Red Hat Enterprise Linux 9 is not affected by this issue, as the fix was back ported to it when the systemd package was rebased for upstream's v250 version on RHBA-2022:3979.

In OpenShift Container Platform (OCP) systemd package was shipped with OCP 4.7 as a one-off instance and all the later OCP releases (4.8, 4.9) are using systemd from RHEL 8. Hence, the systemd package shipped with OCP 4.7 will not be fixed and the fix will be consumed from RHEL 8.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7systemdOut of support scope
Red Hat Enterprise Linux 8systemdFix deferred
Red Hat Enterprise Linux 9systemdNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3997.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-230 Serialized Data with Nested Payloads Likelihood: Medium · Severity: High
  • CAPEC-231 Oversized Serialized Data Payloads Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON