# CVE-2012-6329: Code injection in n/a

> Attackers can execute arbitrary commands via crafted translation strings in applications using the vulnerable Perl Locale::Maketext library.

- **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 stated
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 Jan 2013
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2012-6329, GHSA-g4g2-w92h-7fjc, RHSA-2026:80394

## What is CVE-2012-6329?

CVE-2012-6329 is a high-severity code injection vulnerability in n/a, published on 4 Jan 2013. It can be exploited over the network, and only if a user opens a file or follows a link.

### Official description

The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly handle backslashes and fully qualified method names during compilation of bracket notation, which allows context-dependent attackers to execute arbitrary commands via crafted input to an application that accepts translation strings from users, as demonstrated by the TWiki application before 5.1.3, and the Foswiki application 1.0.x through 1.0.10 and 1.1.x through 1.1.6.

Weakness: CWE-94 (Improper Control of Generation of Code)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `perl` | Red Hat:hummingbird:1 | All versions | 0:5.42.2-525.2.hum1 |
| `perl-Attribute-Handlers` | Red Hat:hummingbird:1 | All versions | 0:1.03-525.2.hum1 |
| `perl-AutoLoader` | Red Hat:hummingbird:1 | All versions | 0:5.74-525.2.hum1 |
| `perl-AutoSplit` | Red Hat:hummingbird:1 | All versions | 0:5.74-525.2.hum1 |
| `perl-B` | Red Hat:hummingbird:1 | All versions | 0:1.89-525.2.hum1 |
| `perl-Benchmark` | Red Hat:hummingbird:1 | All versions | 0:1.27-525.2.hum1 |
| `perl-Class-Struct` | Red Hat:hummingbird:1 | All versions | 0:0.68-525.2.hum1 |
| `perl-Config-Extensions` | Red Hat:hummingbird:1 | All versions | 0:0.03-525.2.hum1 |
| `perl-DBM_Filter` | Red Hat:hummingbird:1 | All versions | 0:0.07-525.2.hum1 |
| `perl-Devel-Peek` | Red Hat:hummingbird:1 | All versions | 0:1.36-525.2.hum1 |
| `perl-Devel-SelfStubber` | Red Hat:hummingbird:1 | All versions | 0:1.06-525.2.hum1 |
| `perl-DirHandle` | Red Hat:hummingbird:1 | All versions | 0:1.05-525.2.hum1 |
| `perl-Dumpvalue` | Red Hat:hummingbird:1 | All versions | 0:2.27-525.2.hum1 |
| `perl-DynaLoader` | Red Hat:hummingbird:1 | All versions | 0:1.57-525.2.hum1 |
| `perl-English` | Red Hat:hummingbird:1 | All versions | 0:1.11-525.2.hum1 |
| `perl-Errno` | Red Hat:hummingbird:1 | All versions | 0:1.38-525.2.hum1 |
| `perl-ExtUtils-Constant` | Red Hat:hummingbird:1 | All versions | 0:0.25-525.2.hum1 |
| `perl-ExtUtils-Embed` | Red Hat:hummingbird:1 | All versions | 0:1.35-525.2.hum1 |
| `perl-ExtUtils-Miniperl` | Red Hat:hummingbird:1 | All versions | 0:1.14-525.2.hum1 |
| `perl-Fcntl` | Red Hat:hummingbird:1 | All versions | 0:1.20-525.2.hum1 |
| `perl-File-Basename` | Red Hat:hummingbird:1 | All versions | 0:2.86-525.2.hum1 |
| `perl-File-Compare` | Red Hat:hummingbird:1 | All versions | 0:1.100.800-525.2.hum1 |
| `perl-File-Copy` | Red Hat:hummingbird:1 | All versions | 0:2.41-525.2.hum1 |
| `perl-File-DosGlob` | Red Hat:hummingbird:1 | All versions | 0:1.12-525.2.hum1 |
| `perl-File-Find` | Red Hat:hummingbird:1 | All versions | 0:1.44-525.2.hum1 |
| `perl-File-stat` | Red Hat:hummingbird:1 | All versions | 0:1.14-525.2.hum1 |
| `perl-FileCache` | Red Hat:hummingbird:1 | All versions | 0:1.10-525.2.hum1 |
| `perl-FileHandle` | Red Hat:hummingbird:1 | All versions | 0:2.05-525.2.hum1 |
| `perl-FindBin` | Red Hat:hummingbird:1 | All versions | 0:1.54-525.2.hum1 |
| `perl-GDBM_File` | Red Hat:hummingbird:1 | All versions | 0:1.24-525.2.hum1 |
| `perl-Getopt-Std` | Red Hat:hummingbird:1 | All versions | 0:1.14-525.2.hum1 |
| `perl-Hash-Util` | Red Hat:hummingbird:1 | All versions | 0:0.32-525.2.hum1 |
| `perl-Hash-Util-FieldHash` | Red Hat:hummingbird:1 | All versions | 0:1.27-525.2.hum1 |
| `perl-I18N-Collate` | Red Hat:hummingbird:1 | All versions | 0:1.02-525.2.hum1 |
| `perl-I18N-LangTags` | Red Hat:hummingbird:1 | All versions | 0:0.45-525.2.hum1 |
| `perl-I18N-Langinfo` | Red Hat:hummingbird:1 | All versions | 0:0.24-525.2.hum1 |
| `perl-IO` | Red Hat:hummingbird:1 | All versions | 0:1.55-525.2.hum1 |
| `perl-IPC-Open3` | Red Hat:hummingbird:1 | All versions | 0:1.24-525.2.hum1 |
| `perl-Locale-Maketext-Simple` | Red Hat:hummingbird:1 | All versions | 0:0.21-525.2.hum1 |
| `perl-Math-Complex` | Red Hat:hummingbird:1 | All versions | 0:1.63-525.2.hum1 |

Products: Perl Perl.

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

Upgrade to a fixed version.

## Is CVE-2012-6329 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-6329 exists.

Public exploit code:

- Foswiki MAKETEXT Remote Command Execution (metasploit)
- TWiki MAKETEXT Remote Command Execution (metasploit)
- TWiki MAKETEXT - Remote Command Execution (Metasploit) (exploitdb)
- Foswiki MAKETEXT - Remote Command Execution (Metasploit) (exploitdb)

## Other vulnerabilities in n/a

- [CVE-2026-4176](https://insights.sbomify.com/CVE-2026-4176/): Supply chain in perl (critical 9.8)
- [CVE-2022-48522](https://insights.sbomify.com/CVE-2022-48522/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-12814](https://insights.sbomify.com/CVE-2017-12814/): Memory corruption in n/a (critical 9.8)
- [CVE-2015-8608](https://insights.sbomify.com/CVE-2015-8608/): Memory corruption in n/a (critical 9.8)
- [CVE-2026-13221](https://insights.sbomify.com/CVE-2026-13221/): Integer overflow in perl:perl (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2012-6329 and fix it if it is affected.

What it is: CVE-2012-6329 is a high-severity code injection vulnerability in n/a, published on 4 Jan 2013. It can be exploited over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-6329 exists.

Affected product: n/a. 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-6329/ (Markdown: https://insights.sbomify.com/CVE-2012-6329/index.md)
```

## Sources

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

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