# CVE-2017-3157: Information disclosure in Apache OpenOffice

> An attacker can read arbitrary files from a user's filesystem by crafting a malicious document in Apache OpenOffice, requiring user interaction to save and return the file.

- **Severity:** Medium 5.5 (`CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Nov 2017
- **Updated:** 16 Sep 2024
- **Also known as:** DEBIAN-CVE-2017-3157, DSA-3792-1, GHSA-c683-7wh2-j8m4, RHSA-2017:0914, RHSA-2017:0979, UBUNTU-CVE-2017-3157, USN-3210-1

## What is CVE-2017-3157?

CVE-2017-3157 is a medium-severity vulnerability in Apache Openoffice, published on 20 Nov 2017. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

By exploiting the way Apache OpenOffice before 4.1.4 renders embedded objects, an attacker could craft a document that allows reading in a file from the user's filesystem. Information could be retrieved by the attacker by, e.g., using hidden sections to store the information, tricking the user into saving the document and convincing the user to send the document back to the attacker. The vulnerability is mitigated by the need for the attacker to know the precise file path in the target system, and the need to trick the user into saving the document and sending it back.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

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

It affects 8 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `autocorr-af` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-bg` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ca` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-cs` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-da` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-de` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-en` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-es` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-fa` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-fi` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-fr` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ga` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-hr` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-hu` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-is` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-it` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ja` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ko` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-lb` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-lt` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-mn` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-nl` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-pl` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-pt` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ro` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-ru` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-sk` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-sl` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-sr` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-sv` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-tr` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-vi` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `autocorr-zh` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-base` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-bsh` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-calc` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-core` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-debuginfo` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |
| `libreoffice-draw` | Red Hat:enterprise_linux:6::client | All versions | 1:4.3.7.2-2.el6_9.1 |

Products: Apache Openoffice, Debian Debian Linux, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server Eus, Redhat Enterprise Linux Server Tus, Redhat Enterprise Linux Workstation.

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

Upgrade to a fixed version.

## Is CVE-2017-3157 being exploited?

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

## Other vulnerabilities in Apache Openoffice

- [CVE-2014-3524](https://insights.sbomify.com/CVE-2014-3524/): Command injection in n/a (critical 9.3)
- [CVE-2010-3450](https://insights.sbomify.com/CVE-2010-3450/): Path traversal in n/a (critical 9.3)
- [CVE-2010-3451](https://insights.sbomify.com/CVE-2010-3451/): Use after free in n/a (critical 9.3)
- [CVE-2010-3452](https://insights.sbomify.com/CVE-2010-3452/): Use after free in n/a (critical 9.3)
- [CVE-2010-3453](https://insights.sbomify.com/CVE-2010-3453/): Memory corruption in n/a (critical 9.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2017-3157 is a medium-severity vulnerability in Apache Openoffice, published on 20 Nov 2017. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2017-3157 in the wild and no public exploit code.

Affected product: Apache Openoffice. 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-3157/ (Markdown: https://insights.sbomify.com/CVE-2017-3157/index.md)
```

## Sources

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

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