# CVE-2017-12613: Information disclosure in Apache Portable Runtime

> Out-of-bounds memory access in APR time functions allows attackers to read heap memory or crash applications via invalid month inputs.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Oct 2017
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2017-12613, DLA-1162-1, DLA-2897-1, GHSA-v99m-xvmc-cgf3, MGASA-2017-0417, OESA-2021-1096, OESA-2021-1097, RHSA-2017:3270, RHSA-2018:0316, RHSA-2018:1253, SUSE-SU-2018:1196-1, SUSE-SU-2018:1322-1, UBUNTU-CVE-2017-12613

## What is CVE-2017-12613?

CVE-2017-12613 is a high-severity vulnerability in Debian Debian Linux, published on 24 Oct 2017. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

When apr_time_exp*() or apr_os_exp_time*() functions are invoked with an invalid month field value in Apache Portable Runtime APR 1.6.2 and prior, out of bounds memory may be accessed in converting this value to an apr_time_exp_t value, potentially revealing the contents of a different static heap value or resulting in program termination, and may represent an information disclosure or denial of service vulnerability to applications which call these APR functions with unvalidated external input.

Weakness: CWE-125 (Out-of-bounds Read)

## Which versions are affected by CVE-2017-12613?

It affects 11 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `apr` | Red Hat:enterprise_linux:6::client | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-devel` | Red Hat:enterprise_linux:6::client | All versions | 0:1.3.9-5.el6_9.1 |
| `apr` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-devel` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.3.9-5.el6_9.1 |
| `apr` | Red Hat:enterprise_linux:6::server | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:6::server | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-devel` | Red Hat:enterprise_linux:6::server | All versions | 0:1.3.9-5.el6_9.1 |
| `apr` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.3.9-5.el6_9.1 |
| `apr-devel` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.3.9-5.el6_9.1 |
| `apr` | Red Hat:enterprise_linux:7::client | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:1.4.8-3.el7_4.1 |
| `apr` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.4.8-3.el7_4.1 |
| `apr` | Red Hat:enterprise_linux:7::server | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-devel` | Red Hat:enterprise_linux:7::server | All versions | 0:1.4.8-3.el7_4.1 |
| `apr` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.4.8-3.el7_4.1 |
| `apr-devel` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.4.8-3.el7_4.1 |
| `apr` | Red Hat:rhel_aus:6.4::server | All versions | 0:1.3.9-5.el6_4.1 |
| `apr-debuginfo` | Red Hat:rhel_aus:6.4::server | All versions | 0:1.3.9-5.el6_4.1 |
| `apr-devel` | Red Hat:rhel_aus:6.4::server | All versions | 0:1.3.9-5.el6_4.1 |
| `apr` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.3.9-5.el6_5.1 |
| `apr-debuginfo` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.3.9-5.el6_5.1 |
| `apr-devel` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.3.9-5.el6_5.1 |
| `apr` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.3.9-5.el6_6.1 |
| `apr-debuginfo` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.3.9-5.el6_6.1 |
| `apr-devel` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.3.9-5.el6_6.1 |
| `apr` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr-debuginfo` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr-devel` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr` | Red Hat:rhel_e4s:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr-debuginfo` | Red Hat:rhel_e4s:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr-devel` | Red Hat:rhel_e4s:7.2::server | All versions | 0:1.4.8-3.el7_2.1 |
| `apr` | Red Hat:rhel_eus:6.7::computenode | All versions | 0:1.3.9-5.el6_7.1 |

Products: Apache Portable Runtime, Debian Debian Linux, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Eus, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server Tus, Redhat Enterprise Linux Workstation, Redhat Jboss Core Services, Redhat Jboss Enterprise Web Server, Redhat Software Collections.

## How do I fix CVE-2017-12613?

Upgrade to a fixed version.

## Is CVE-2017-12613 being exploited?

There is no known exploitation of CVE-2017-12613 in the wild and no public exploit code.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2022-24963](https://insights.sbomify.com/CVE-2022-24963/): Apache Portable Runtime (APR): out-of-bound writes in the apr_encode family of functions (critical 9.8)
- [CVE-2022-28331](https://insights.sbomify.com/CVE-2022-28331/): Apache Portable Runtime (APR): Windows out-of-bounds write in apr_socket_sendv function (critical 9.8)
- [CVE-2021-35940](https://insights.sbomify.com/CVE-2021-35940/): Regression of CVE-2017-12613 (high 7.1)
- [CVE-2023-49582](https://insights.sbomify.com/CVE-2023-49582/): Apache Portable Runtime (APR): Unexpected lax shared memory permissions (medium 5.5)
- [CVE-2012-0840](https://insights.sbomify.com/CVE-2012-0840/): Denial of service in n/a (medium 5.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-12613 and fix it if it is affected.

What it is: CVE-2017-12613 is a high-severity vulnerability in Debian Debian Linux, published on 24 Oct 2017. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-12613 in the wild and no public exploit code.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-12613/ (Markdown: https://insights.sbomify.com/CVE-2017-12613/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-12613
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-12613
- OSV: https://osv.dev/vulnerability/CVE-2017-12613

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-12613/
Summaries are generated and may contain mistakes; the official description above is the record.
