CVE-2025-48058: Powsybl commons Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-rqpx-f6rc-7hm5
CWE-1333
Published
Advisory Summary

CVE-2025-48058 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Powsybl commons libraries in the Maven ecosystem. The issue involves powsybl core contains polynomial redos’es. Remediation is available by upgrading affected packages to version 6.7.2.

CVE-2025-48058 at a Glance

CVE Identifier CVE-2025-48058
GHSA Identifier GHSA-rqpx-f6rc-7hm5
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Powsybl commons
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-48058

To remediate this vulnerability, upgrade all affected Powsybl commons dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.powsybl:powsybl-commons fixed: 6.7.2
<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-commons</artifactId>
    <version>6.7.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.powsybl

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-48058, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.powsybl

Analyze the terminal output to locate any version of Powsybl commons in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.7.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.powsybl command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Powsybl commons, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 PowSyBl's DataSource mechanism. When the `listNames(String regex)` method is called on a DataSource, the user-supplied regular expression (which may be unvalidated) is compiled and evaluated against a collection of file-like resource names. To trigger a **polynomial ReDoS** via this mechanism, **two attacker-controlled conditions** must be met: - **Control over the regex input** passed into `listNames(String regex)`. - _Example:_ An attacker supplies a malicious pattern like `(.*a){10000}`. - **Control or influence over the file/resource names** being matched. - _Example:_ Filenames such as `"aaaa...!"` that induce regex engine backtracking. If both conditions are satisfied, a malicious actor can cause **significant CPU consumption** due to regex backtracking — even with polynomial patterns. Since both inputs can be controlled via a publicly accessible method or external filesystem handling, the `listNames(String regex)` method is considered vulnerable to polynomial **REDoS**. Unlike classic _catastrophic exponential_ ReDoS, this subtle attack exploits a greedy `.*` prefix followed by a fixed suffix, repeated multiple times. When applied to long filenames that almost match the pattern, the regex engine performs extensive backtracking, degrading performance predictably with input size. In a multi-tenant environment, an attacker can degrade the performance - and thereby the availability - of the server to an extent that it affects other users of the application. This can for example be useful if an attacker wants to delay other users in a scenario where a time advantage can be a competitive advantage. A tricky part in this is that the attacker needs to control both the pattern and the input which may not always be the case. #### Am I impacted? You are vulnerable if you make direct calls to the `listNames(String regex)` method on a class implementing the `ReadOnlyDataSource` interface, don't control the regular expression used as `regex` parameter, and if this datasource points to an archive or directory where an untrusted user may edit the filenames. For instance, this could be the case if you want to list the files made available by a datasource which names respect a user-provided regular expression. Note that only direct calls to this method are concerned. There are several usages of this method in powsybl, but the provided regular expressions are all hardcoded and therefore cannot be provided by a malicious user. ### Patches com.powsybl:powsybl-commons:6.7.2 and higher ### References [powsybl-core v6.7.2](https://github.com/powsybl/powsybl-core/releases/tag/v6.7.2)

CVE-2025-48058 Affected Powsybl commons Versions

1 component(s)
Fixed Versions:
6.7.2
Product / Package Ecosystem Affected Versions Fixed Version
com.powsybl:powsybl-commons
Maven
< 6.7.2
6.7.2

References

Frequently Asked Questions

What is CVE-2025-48058?
CVE-2025-48058 is a security vulnerability in Powsybl commons involving PowSyBl Core contains Polynomial REDoS’es under CWE-1333: Inefficient Regular Expression Complexity.
Which Powsybl commons versions are affected?
Affected versions include releases prior to 6.7.2 across affected packages: com.powsybl:powsybl-commons.
What version fixes CVE-2025-48058?
Upgrading to 6.7.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is powsybl-commons affected?
Yes, com.powsybl:powsybl-commons is affected in releases prior to 6.7.2. Upgrade your dependency to 6.7.2 or later.
What CWE is associated with CVE-2025-48058?
CVE-2025-48058 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check Maven dependencies for CVE-2025-48058?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.powsybl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rqpx-f6rc-7hm5",
  "modified" : "2025-06-20T14:20:59Z",
  "published" : "2025-06-19T16:19:33Z",
  "aliases" : [ "CVE-2025-48058" ],
  "summary" : "PowSyBl Core contains Polynomial REDoS’es",
  "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 PowSyBl's DataSource mechanism. When the `listNames(String regex)` method is called on a DataSource, the user-supplied regular expression (which may be unvalidated) is compiled and evaluated against a collection of file-like resource names.\n\nTo trigger a **polynomial ReDoS** via this mechanism, **two attacker-controlled conditions** must be met:\n- **Control over the regex input** passed into `listNames(String regex)`.\n  - _Example:_ An attacker supplies a malicious pattern like `(.*a){10000}`.\n- **Control or influence over the file/resource names** being matched.\n  - _Example:_ Filenames such as `\"aaaa...!\"` that induce regex engine backtracking.\n\nIf both conditions are satisfied, a malicious actor can cause **significant CPU consumption** due to regex backtracking — even\nwith polynomial patterns. Since both inputs can be controlled via a publicly accessible method or external filesystem handling,\nthe `listNames(String regex)` method is considered vulnerable to polynomial **REDoS**.\n\nUnlike classic _catastrophic exponential_ ReDoS, this subtle attack exploits a greedy `.*` prefix followed by a fixed suffix, repeated multiple times.  \nWhen applied to long filenames that almost match the pattern, the regex engine performs extensive backtracking, degrading performance predictably with input size. In a multi-tenant environment, an attacker can degrade the performance - and thereby the availability - of the server to an extent that it affects other users of the application. This can for example be useful if an attacker wants to delay other users in a scenario where a time advantage can be a competitive advantage.  \nA tricky part in this is that the attacker needs to control both the pattern and the input which may not always be the case.\n\n#### Am I impacted?\nYou are vulnerable if you make direct calls to the `listNames(String regex)` method on a class implementing the `ReadOnlyDataSource` interface, don't control the regular expression used as `regex` parameter, and if this datasource points to an archive or directory where an untrusted user may edit the filenames.\nFor instance, this could be the case if you want to list the files made available by a datasource which names respect a user-provided regular expression.\nNote that only direct calls to this method are concerned. There are several usages of this method in powsybl, but the provided regular expressions are all hardcoded and therefore cannot be provided by a malicious user.\n\n### Patches\ncom.powsybl:powsybl-commons: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)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.powsybl:powsybl-commons"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.7.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.7.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/powsybl/powsybl-core/security/advisories/GHSA-rqpx-f6rc-7hm5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48058"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/powsybl/powsybl-core/commit/72f79dec6d4292f892fbddd68a19c67935c7d81f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/powsybl/powsybl-core"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/powsybl/powsybl-core/releases/tag/v6.7.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-19T16:19:33Z",
    "nvd_published_at" : "2025-06-20T01:15:38Z"
  }
}