# CVE-2025-48059: PowSyBl Core Contains a Polynomial ReDoS in RegexCriterion

> Attackers can cause CPU exhaustion via ReDoS in PowSyBl Core by supplying malicious regex patterns to filter operations.

- **Severity:** Low 2.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Jun 2025
- **Updated:** 20 Jun 2025
- **Also known as:** GHSA-8qjw-9xgm-c9ff

## What is CVE-2025-48059?

CVE-2025-48059 is a low-severity denial of service vulnerability in powsybl-core, published on 20 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

PowSyBl (Power System Blocks) is a framework to build power system oriented software. In com.powsybl:powsybl-iidm-criteria versions 6.3.0 to before 6.7.2 and com.powsybl:powsybl-contingency-api versions 5.0.0 to before 6.3.0, there is a a potential polynomial Regular Expression Denial of Service (ReDoS) vulnerability in the RegexCriterion class. This class compiles and evaluates an unvalidated, user-supplied regular expression against the identifier of an Identifiable object via Pattern.compile(regex).matcher(id).find(). If successfully exploited, a malicious actor can cause significant CPU exhaustion through repeated or recursive filter(...) calls — especially if performed over large network models or filtering operations. This issue has been patched in com.powsybl:powsybl-iidm-criteria 6.7.2.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2025-48059?

4 open source packages ship an affected version, including com.powsybl:powsybl-contingency-api and com.powsybl:powsybl-iidm-criteria.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.powsybl:powsybl-contingency-api` | Maven | From 5.0.0 | 6.3.0 |
| `com.powsybl:powsybl-contingency-api` | Maven | From 5.0.0 | 6.3.0 |
| `com.powsybl:powsybl-iidm-criteria` | Maven | From 6.3.0 | 6.7.2 |
| `com.powsybl:powsybl-iidm-criteria` | Maven | From 6.3.0 | 6.7.2 |

## How do I fix CVE-2025-48059?

Upgrade com.powsybl:powsybl-contingency-api to 6.3.0 or later.

## Is CVE-2025-48059 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-48059 and fix it if it is affected.

What it is: CVE-2025-48059 is a low-severity denial of service vulnerability in powsybl-core, published on 20 Jun 2025. 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-2025-48059 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.powsybl:powsybl-contingency-api (Maven): affected from 5.0.0; fixed in 6.3.0
- com.powsybl:powsybl-contingency-api (Maven): affected from 5.0.0; fixed in 6.3.0
- com.powsybl:powsybl-iidm-criteria (Maven): affected from 6.3.0; fixed in 6.7.2
- com.powsybl:powsybl-iidm-criteria (Maven): affected from 6.3.0; fixed in 6.7.2

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

## Sources

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

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