{"id":"CVE-2025-48059","aliases":["GHSA-8qjw-9xgm-c9ff"],"url":"https://o3.security/vulnerability/CVE-2025-48059","summary":"PowSyBl Core Contains a Polynomial ReDoS in RegexCriterion","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 — 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)","published":"2025-06-20T16:50:35.974Z","modified":"2026-08-12T03:51:20.894429133Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Maven","name":"com.powsybl:powsybl-iidm-criteria","fixedVersion":"6.7.2"},{"ecosystem":"Maven","name":"com.powsybl:powsybl-contingency-api","fixedVersion":"6.3.0"}],"fix":{"url":"https://github.com/powsybl/powsybl-core/commit/d8398f689a5ccd505bd62eee2bd6670a29133110","label":"powsybl/powsybl-core@d8398f6"},"references":[{"type":"WEB","url":"https://github.com/powsybl/powsybl-core/releases/tag/v6.7.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/48xxx/CVE-2025-48059.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/powsybl/powsybl-core/commit/d8398f689a5ccd505bd62eee2bd6670a29133110"},{"type":"PACKAGE","url":"https://github.com/powsybl/powsybl-core"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:20.894429133Z"}}