# CVE-2007-6183: gtk2 vulnerable to Use of Externally-Controlled Format String

> Attackers can execute arbitrary code via format string specifiers in the message parameter of Ruby-GNOME 2 message dialogs.

- **Severity:** Medium 6.8 (`AV:N/AC:M/Au:N/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 30 Nov 2007
- **Updated:** 7 Aug 2024
- **Also known as:** DSA-1431-1, DTSA-102-1, GHSA-xgj6-pgrm-x4r2

## What is CVE-2007-6183?

CVE-2007-6183 is a medium-severity vulnerability in n/a, published on 30 Nov 2007. 

### Official description

Format string vulnerability in the mdiag_initialize function in gtk/src/rbgtkmessagedialog.c in Ruby-GNOME 2 (aka Ruby/Gnome2) 0.16.0, and SVN versions before 20071127, allows context-dependent attackers to execute arbitrary code via format string specifiers in the message parameter.

Weakness: CWE-134 (Use of Externally-Controlled Format String)

## Which versions are affected by CVE-2007-6183?

2 open source packages ship an affected version, including gtk2. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gtk2` | RubyGems | All versions | 0.17.0 |
| `gtk2` | RubyGems | All versions | 0.17.0 |

Products: Ruby Gnome2 Ruby Gnome2.

## How do I fix CVE-2007-6183?

Upgrade gtk2 to 0.17.0 or later.

## Is CVE-2007-6183 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2007-6183 and fix it if it is affected.

What it is: CVE-2007-6183 is a medium-severity vulnerability in n/a, published on 30 Nov 2007. 
Exploitation: There is no known exploitation of CVE-2007-6183 in the wild and no public exploit code.

Affected packages and fixed versions:
- gtk2 (RubyGems): affected all versions; fixed in 0.17.0
- gtk2 (RubyGems): affected all versions; fixed in 0.17.0

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-2007-6183/ (Markdown: https://insights.sbomify.com/CVE-2007-6183/index.md)
```

## Sources

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

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