# CVE-2023-33546: janino vulnerable to denial of service due to stack overflow

> An attacker can cause a denial of service via stack overflow in Janino's expression evaluator if it processes untrusted input.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **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:** 1 Jun 2023
- **Updated:** 2 Aug 2024
- **Also known as:** DEBIAN-CVE-2023-33546, GHSA-gcg6-xv4f-f749, SUSE-SU-2023:3385-1, openSUSE-SU-2024:13129-1

## What is CVE-2023-33546?

CVE-2023-33546 is a medium-severity denial of service vulnerability in n/a, published on 1 Jun 2023. 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

Janino 3.1.9 and earlier are subject to denial of service (DOS) attacks when using the expression evaluator.guess parameter name method. If the parser runs on user-supplied input, an attacker could supply content that causes the parser to crash due to a stack overflow. NOTE: this is disputed by multiple parties because Janino is not intended for use with untrusted input.

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

## Which versions are affected by CVE-2023-33546?

2 open source packages ship an affected version, including org.codehaus.janino:janino-parent. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.codehaus.janino:janino-parent` | Maven | All versions to 3.1.9 | None |
| `org.codehaus.janino:janino-parent` | Maven | All versions to 3.1.9 | None |
| `janino` | openSUSE:Leap 15.4 | All versions | 3.1.10-150200.3.7.1 |
| `janino` | openSUSE:Leap 15.5 | All versions | 3.1.10-150200.3.7.1 |

Products: Janino Project Janino.

## How do I fix CVE-2023-33546?

Upgrade to a fixed version.

## Is CVE-2023-33546 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-33546 and fix it if it is affected.

What it is: CVE-2023-33546 is a medium-severity denial of service vulnerability in n/a, published on 1 Jun 2023. 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-33546 exists.

Affected packages and fixed versions:
- org.codehaus.janino:janino-parent (Maven): affected all versions up to 3.1.9; no fix listed
- org.codehaus.janino:janino-parent (Maven): affected all versions up to 3.1.9; no fix listed

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

## Sources

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

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