# CVE-2012-2665: Memory corruption in n/a

> Remote attackers can execute arbitrary code or cause denial of service via crafted ODT files exploiting heap buffer overflows in OpenOffice and LibreOffice.

- **Severity:** High 7.5 (`AV:N/AC:L/Au:N/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Aug 2012
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2012-2665, DSA-2520-1, GHSA-36hh-vpg6-r82h, RHSA-2012:1135, RHSA-2012:1136

## What is CVE-2012-2665?

CVE-2012-2665 is a high-severity memory corruption vulnerability in Apache Openoffice, published on 6 Aug 2012. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Multiple heap-based buffer overflows in the XML manifest encryption tag parsing functionality in OpenOffice.org and LibreOffice before 3.5.5 allow remote attackers to cause a denial of service and possibly execute arbitrary code via a crafted Open Document Text (.odt) file with (1) a child tag within an incorrect parent tag, (2) duplicate tags, or (3) a Base64 ChecksumAttribute whose length is not evenly divisible by four.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2012-2665?

It affects 11 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openoffice.org` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-base` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-calc` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-core` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-debuginfo` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-draw` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-emailmerge` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-graphicfilter` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-headless` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-impress` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-javafilter` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-af_ZA` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ar` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-as_IN` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-bg_BG` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-bn` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ca_ES` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-cs_CZ` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-cy_GB` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-da_DK` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-de` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-el_GR` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-es` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-et_EE` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-eu_ES` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-fi_FI` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-fr` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ga_IE` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-gl_ES` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-gu_IN` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-he_IL` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-hi_IN` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-hr_HR` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-hu_HU` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-it` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ja_JP` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-kn_IN` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ko_KR` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-lt_LT` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |
| `openoffice.org-langpack-ml_IN` | Red Hat:enterprise_linux:5::client | All versions | 1:3.1.1-19.10.el5_8.4 |

Products: Apache Openoffice, Canonical Ubuntu Linux, Debian Debian Linux, Libreoffice Libreoffice, Redhat Enterprise Linux, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Power Big Endian, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server From Rhui 6, Redhat Enterprise Linux Workstation.

## How do I fix CVE-2012-2665?

Upgrade to a fixed version.

## Is CVE-2012-2665 being exploited?

There is no known exploitation of CVE-2012-2665 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-2012-2665 and fix it if it is affected.

What it is: CVE-2012-2665 is a high-severity memory corruption vulnerability in Apache Openoffice, published on 6 Aug 2012. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2012-2665 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-2012-2665/ (Markdown: https://insights.sbomify.com/CVE-2012-2665/index.md)
```

## Sources

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

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