Home / Apache Software Foundation / Apache Portable Runtime (APR) / CVE-2021-35940
CVE-2021-35940: is it exploited, and which versions of Apache Software Foundation Apache Portable Runtime (APR) are affected and fixed?
CVE-2021-35940 is an out-of-bounds read vulnerability in Apache Software Foundation Apache Portable Runtime (APR). It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:38 UTC). Affected: Apache Portable Runtime (APR) Apache Portable Runtime 1.7.0 (CVE record by apache). No fixed version is listed in the sources yet; check the vendor advisory. Severity: High (7.1, CVSS 3.1, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:38 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:55 UTC.
What is CVE-2021-35940?
Regression of CVE-2017-12613
An out-of-bounds array read in the apr_time_exp*() functions was fixed in the Apache Portable Runtime 1.6.3 release (CVE-2017-12613). The fix for this issue was not carried forward to the APR 1.7.x branch, and hence version 1.7.0 regressed compared to 1.6.3 and is vulnerable to the same issue.
From the CVE record by apache, last updated August 4, 2024, 00:40 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Apache Software Foundation | Apache Portable Runtime (APR) | Apache Portable Runtime 1.7.0 |
As the CVE record by apache states it, last updated August 4, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| apache | portable runtime | 1.7.0 | application |
| oracle | http server | 12.2.1.3.0 | application |
| oracle | http server | 12.2.1.4.0 | application |
NVD analysis (status Modified), last modified June 17, 2026, 03:57 UTC.
How severe is CVE-2021-35940?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.1 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H | NVD |
| Low 3.6 | CVSS 2.0 | AV:L/AC:L/Au:N/C:P/I:N/A:P | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-35940 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 1.19% probability of exploitation activity in the next 30 days, percentile 68.7 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-125 Out-of-bounds Read
Where are the vendor advisories and references?
- http://svn.apache.org/viewvc?view=revision&revision=1891198 x_refsource_MISC
- http://mail-archives.apache.org/mod_mbox/www-announce/201710.mbox/%3CCACsi251B8UaLvM-rrH9fv57-zWi0zhyF3275_jPg1a9VEVVoxw%40mail.gmail.com%3E x_refsource_MISC
- https://dist.apache.org/repos/dist/release/apr/patches/apr-1.7.0-CVE-2021-35940.patch x_refsource_MISC
- https://lists.apache.org/thread.html/ra2868b53339a6af65577146ad87016368c138388b09bff9d2860f50e%40%3Cdev.apr.apache.org%3E x_refsource_MISC
- [oss-security] 20210823 CVE-2021-35940: Apache Portable Runtime (APR): Regression of CVE-2017-12613 mailing-list, x_refsource_MLIST
- [announce] 20210823 CVE-2021-35940: Apache Portable Runtime (APR): Regression of CVE-2017-12613 mailing-list, x_refsource_MLIST
- [apr-dev] 20210831 APR 1.7.1 release? mailing-list, x_refsource_MLIST
- [httpd-dev] 20210831 APR 1.7.1 release? mailing-list, x_refsource_MLIST
- [apr-dev] 20210831 Re: APR 1.7.1 release? mailing-list, x_refsource_MLIST
- [apr-dev] 20210901 Re: APR 1.7.1 release? mailing-list, x_refsource_MLIST
- [apr-dev] 20210916 Re: CVE-2021-35940: Apache Portable Runtime (APR): Regression of CVE-2017-12613 mailing-list, x_refsource_MLIST
- [tomcat-dev] 20210922 [jira] [Created] (MTOMCAT-327) Tomcat 9.0.50 and it has apr-1.7.0 dependency, with Address CVE-2021-35940 mailing-list, x_refsource_MLIST
- [tomcat-dev] 20210922 [jira] [Resolved] (MTOMCAT-327) Tomcat 9.0.50 and it has apr-1.7.0 dependency, with Address CVE-2021-35940 mailing-list, x_refsource_MLIST
- [tomcat-dev] 20210922 [jira] [Commented] (MTOMCAT-327) Tomcat 9.0.50 and it has apr-1.7.0 dependency, with Address CVE-2021-35940 mailing-list, x_refsource_MLIST
- [tomcat-dev] 20210922 [jira] [Reopened] (MTOMCAT-327) Tomcat 9.0.50 and it has apr-1.7.0 dependency, with Address CVE-2021-35940 mailing-list, x_refsource_MLIST
- https://www.oracle.com/security-alerts/cpujul2022.html x_refsource_MISC
Who found and reported it?
- The Apache Portable Runtime project would like to thank Iveta Cesalova (Red Hat) for reporting this issue. (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- June 29, 2021
- Published
- August 23, 2021, 10:00 UTC
- CVE record updated
- August 4, 2024, 00:40 UTC by apache
- NVD
- Modified, last modified June 17, 2026, 03:57 UTC
- Last checked
- CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:55 UTC; KEV December 3, 2026, 12:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Apache Portable Runtime (APR)?
- Aug 26, 2024CVE-2023-49582 Apache Software Foundation Apache Portable Runtime (APR): incorrect permissions on a critical resource
- Jan 31, 2023CVE-2022-28331 Apache Software Foundation Apache Portable Runtime (APR): integer overflow
- Jan 31, 2023CVE-2022-24963 Apache Software Foundation Apache Portable Runtime (APR): integer overflow
Every CVE in Apache Portable Runtime (APR)
Questions about CVE-2021-35940
Is CVE-2021-35940 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:38 UTC. FIRST's EPSS gives it a 1.19% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Apache Software Foundation Apache Portable Runtime (APR) are affected by CVE-2021-35940?
Apache Portable Runtime (APR) Apache Portable Runtime 1.7.0, per the CVE record by apache. The tables above give every range the sources list.
Which version fixes CVE-2021-35940?
None of the sources (the CVE record, the NVD and GitHub's reviewed advisories) lists a fixed version yet. Check the vendor's advisory in the references.
How severe is CVE-2021-35940?
High (7.1, CVSS 3.1, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2021-35940?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.