cve.bz

CVE-2021-21704 Out-of-bounds Write

5.9 mediumExploit referenceEPSS 1.7%Fix available

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

On this page
In PHP versions 7.3.x below 7.3.29, 7.4.x below 7.4.21 and 8.0.x below 8.0.8, when using Firebird PDO driver extension, a malicious database server could cause crashes in various database functions, such as getAttribute(), execute(), fetch() and others by returning invalid response data that is not parsed correctly by the driver. This can result in crashes, denial of service or potentially memory corruption.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
1.7% (unchanged from 1.8% a week ago; 1.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-787 Out-of-bounds Write
CWE-125 Out-of-bounds Read
CWE-190 Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse)
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-21704 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21704?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21704?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-21704 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.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
PHP Group PHPfrom 7.3.x before 7.3.29
PHP Group PHPfrom 7.4.x before 7.4.21
PHP Group PHPfrom 8.0.X before 8.0.8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9php7.07.0.33-0+deb9u11DLA-2708-1
Debian10php7.37.3.29-1~deb10u1DSA-4935-1
Debian11php7.47.4.21-1+deb11u1DEBIAN-CVE-2021-21704
Ubuntu18.04:LTSphp7.27.2.24-0ubuntu0.18.04.8UBUNTU-CVE-2021-21704 USN-5006-1
Ubuntu20.04:LTSphp7.47.4.3-4ubuntu2.5UBUNTU-CVE-2021-21704 USN-5006-1
UbuntuPro:14.04:LTSphp55.5.9+dfsg-1ubuntu4.29+esm14UBUNTU-CVE-2021-21704 USN-5006-2
UbuntuPro:16.04:LTSphp7.07.0.33-0ubuntu0.16.04.16+esm1UBUNTU-CVE-2021-21704 USN-5006-2
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 morephp77.2.34-150000.4.103.1SUSE-SU-2022:4067-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 morephp77.2.5-4.79.1SUSE-SU-2021:2795-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-ESPOS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 8 morephp77.4.33-150200.3.46.2SUSE-SU-2022:4069-1
SUSELinux Enterprise Module for Package Hub 15 SP2, Linux Enterprise Module for Package Hub 15 SP3, Linux Enterprise Module for Web and Scripting 15 SP2 and 1 morephp77.4.6-3.22.1SUSE-SU-2021:2637-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Software Development Kit 12 SP5php727.2.5-1.66.1SUSE-SU-2021:2638-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Software Development Kit 12 SP5php747.4.33-1.47.2SUSE-SU-2022:4068-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Software Development Kit 12 SP5php747.4.6-1.24.1SUSE-SU-2021:2636-1
openSUSELeap 15.2php7, php7-test7.4.6-lp152.2.18.1openSUSE-SU-2021:1130-1
openSUSELeap 15.3php77.2.5-4.79.1openSUSE-SU-2021:2795-1
openSUSELeap 15.3php77.4.6-3.22.1openSUSE-SU-2021:2637-1
openSUSELeap 15.3php7, php7-test7.4.33-150200.3.46.2SUSE-SU-2022:4069-1
openSUSELeap 15.4php77.2.34-150000.4.103.1SUSE-SU-2022:4067-1
openSUSELeap 15.4php77.4.33-150200.3.46.2SUSE-SU-2022:4069-1

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. 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

PHP versions distributed with Red Hat Enterprise Linux 6, 7 and 8 are not affected by this vulnerability as Firebase extension is currently not distributed by Red Hat.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6phpNot affected
Red Hat Enterprise Linux 7phpNot affected
Red Hat Enterprise Linux 8php:7.3/phpNot affected
Red Hat Enterprise Linux 8php:7.4/phpNot affected
Red Hat Enterprise Linux 9phpNot affected
Red Hat Software Collectionsrh-php73-phpNot 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-21704.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-027-02Festo Didactic SE MES PC2024-02-27Commercial Facilities, Communications, Critical Manufacturing, EnergyFesto Didactic SE MES PC shipped with Windows 10none 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-540 Overread Buffers Likelihood: Low · Severity: High
  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

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

References

Check your stackJSON