ghsa-8qjw-9xgm-c9ff
Vulnerability from github
Impact
What kind of vulnerability is it? Who is impacted?
This is an advisory for 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()
.
To trigger polynomial ReDoS in RegexCriterion
, two attacker-controlled conditions must be met:
- Control over the regex input passed into the constructor:
- Example: An attacker supplies a malicious pattern such as (.*a){10000}
.
- Control or influence over the output of Identifiable.getId()
:
- Example: A long string like "aaaa...!"
that forces excessive backtracking.
If both conditions are satisfied, a malicious actor can cause significant CPU exhaustion through repeated or recursive filter(...)
calls — especially if performed over large network models or filtering operations.
While this class does not handle file or memory data directly, its reliance on untrusted regular expressions and potentially attacker-controlled identifiers makes it vulnerable to polynomial ReDoS under the right conditions. This risk is amplified when the library is used in dynamic or scriptable environments where external users control either criterion construction or network object identifiers.
Although not as dangerous as catastrophic exponential ReDoS, the polynomial pattern still induces significant performance
degradation as input size increases.
Am I impacted?
Since RegexCriterion
are used to define contingencies or limit reductions, you are vulnerable if:
- you allow untrusted users to define contingency lists or limit reductions using this criterion;
- OR you load untrusted contingencies or limit reductions files
AND use them with a network containing untrusted identifiers.
Patches
com.powsybl:powsybl-iidm-criteria:6.7.2 and higher
References
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 6.7.1" }, "package": { "ecosystem": "Maven", "name": "com.powsybl:powsybl-iidm-criteria" }, "ranges": [ { "events": [ { "introduced": "6.3.0" }, { "fixed": "6.7.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "com.powsybl:powsybl-contingency-api" }, "ranges": [ { "events": [ { "introduced": "5.0.0" }, { "fixed": "6.3.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-48059" ], "database_specific": { "cwe_ids": [ "CWE-1333" ], "github_reviewed": true, "github_reviewed_at": "2025-06-19T16:19:48Z", "nvd_published_at": "2025-06-20T17:15:40Z", "severity": "LOW" }, "details": "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nThis is an advisory for 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()`.\n\nTo trigger **polynomial ReDoS** in `RegexCriterion`, **two attacker-controlled conditions** must be met:\n- **Control over the regex input** passed into the constructor:\n - _Example:_ An attacker supplies a malicious pattern such as `(.*a){10000}`.\n- **Control or influence over the output of `Identifiable.getId()`**:\n - _Example:_ A long string like `\"aaaa...!\"` that forces excessive backtracking.\n\nIf both conditions are satisfied, a malicious actor can cause **significant CPU exhaustion** through repeated or recursive `filter(...)` calls \u2014 especially if performed over large network models or filtering operations.\nWhile this class does not handle file or memory data directly, its reliance on untrusted regular expressions and potentially attacker-controlled identifiers makes it vulnerable to **polynomial ReDoS** under the right conditions. This risk is amplified when the library is used in dynamic or scriptable environments where external users control either criterion construction or network object identifiers.\nAlthough not as dangerous as _catastrophic exponential ReDoS_, the polynomial pattern still induces significant performance\ndegradation as input size increases.\n\n#### Am I impacted?\nSince `RegexCriterion` are used to define contingencies or limit reductions, you are vulnerable if:\n- you allow untrusted users to define contingency lists or limit reductions using this criterion;\n- OR you load untrusted contingencies or limit reductions files\n\nAND use them with a network containing untrusted identifiers.\n\n### Patches\ncom.powsybl:powsybl-iidm-criteria:6.7.2 and higher\n\n### References\n[powsybl-core v6.7.2](https://github.com/powsybl/powsybl-core/releases/tag/v6.7.2)", "id": "GHSA-8qjw-9xgm-c9ff", "modified": "2025-06-20T22:20:47Z", "published": "2025-06-19T16:19:48Z", "references": [ { "type": "WEB", "url": "https://github.com/powsybl/powsybl-core/security/advisories/GHSA-8qjw-9xgm-c9ff" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-48059" }, { "type": "WEB", "url": "https://github.com/powsybl/powsybl-core/commit/d8398f689a5ccd505bd62eee2bd6670a29133110" }, { "type": "PACKAGE", "url": "https://github.com/powsybl/powsybl-core" }, { "type": "WEB", "url": "https://github.com/powsybl/powsybl-core/releases/tag/v6.7.2" } ], "schema_version": "1.4.0", "severity": [ { "score": "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", "type": "CVSS_V4" } ], "summary": "PowSyBl Core Contains a Polynomial ReDoS in RegexCriterion" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.