# CVE-2015-5306: Injection vulnerability that affects ironic-discoverd

> Remote attackers can execute arbitrary Python code via the Flask console if debug mode is enabled in OpenStack Ironic Inspector.

- **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:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Nov 2015
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2015-5306, GHSA-x64g-wjmw-w328, PYSEC-2015-28, PYSEC-2026-505, RHSA-2015:1929, RHSA-2015:2685

## What is CVE-2015-5306?

CVE-2015-5306 is a medium-severity code injection vulnerability in n/a, published on 25 Nov 2015. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

OpenStack Ironic Inspector (aka ironic-inspector or ironic-discoverd), when debug mode is enabled, might allow remote attackers to access the Flask console and execute arbitrary Python code by triggering an error.

Weakness: CWE-254

## Which versions are affected by CVE-2015-5306?

6 open source packages ship an affected version, including ironic-inspector and python-ironic-inspector-client. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ironic-inspector` | PyPI | All versions | 2.2.2 |
| `ironic-inspector` | PyPI | All versions | 2.2.2 |
| `ironic-inspector` | PyPI | All versions | 2.3.0 |
| `python-ironic-inspector-client` | PyPI | All versions | 0.2.5 |
| `python-ironic-inspector-client` | PyPI | All versions | 0.2.5 |
| `python-ironic-inspector-client` | PyPI | All versions | 0.2.5 |
| `openstack-ironic-discoverd` | Red Hat:openstack-director:7::el7 | All versions | 0:1.1.0-8.el7ost |
| `openstack-ironic-discoverd-ramdisk` | Red Hat:openstack-director:7::el7 | All versions | 0:1.1.0-8.el7ost |
| `python-ironic-discoverd` | Red Hat:openstack-director:7::el7 | All versions | 0:1.1.0-8.el7ost |
| `openstack-ironic-discoverd` | Red Hat:openstack:6::el7 | All versions | 0:0.2.5-2.el7ost |

Products: Openstack Ironic Inspector.

## How do I fix CVE-2015-5306?

Upgrade ironic-inspector to a fixed version for your release line: 2.2.2 or 2.3.0.

## Is CVE-2015-5306 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2015-5306 and fix it if it is affected.

What it is: CVE-2015-5306 is a medium-severity code injection vulnerability in n/a, published on 25 Nov 2015. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2015-5306 in the wild and no public exploit code.

Affected packages and fixed versions:
- ironic-inspector (PyPI): affected all versions; fixed in 2.2.2
- ironic-inspector (PyPI): affected all versions; fixed in 2.2.2
- ironic-inspector (PyPI): affected all versions; fixed in 2.3.0
- python-ironic-inspector-client (PyPI): affected all versions; fixed in 0.2.5
- python-ironic-inspector-client (PyPI): affected all versions; fixed in 0.2.5
- python-ironic-inspector-client (PyPI): affected all versions; fixed in 0.2.5

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

## Sources

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

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