CVE-2025-30358: Mesop Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-f3mf-hm6v-jfhh
CVSS 8.1
CWE-915
Published
Advisory Summary

CVE-2025-30358 is a HIGH (CVSS 8.1) denial of service vulnerability (CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes) affecting Mesop libraries in the PyPI ecosystem. The issue involves mesop class pollution vulnerability leads to dos and jailbreak attacks. Remediation is available by upgrading affected packages to version 0.14.1.

CVE-2025-30358 at a Glance

CVE Identifier CVE-2025-30358
GHSA Identifier GHSA-f3mf-hm6v-jfhh
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
Affected Product Mesop
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-30358

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

mesop fixed: 0.14.1
pip install mesop>=0.14.1
Verify Direct and Transitive Dependencies

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

pip show mesop

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-30358, inspect your installed packages using pip:

pip show mesop

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

Note: The pip show mesop command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes, where the product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. In Mesop, 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

From @jackfromeast and @superboy-zjc: We have identified a class pollution vulnerability in Mesop (<= [0.14.0](https://github.com/mesop-dev/mesop/releases/tag/v0.14.0)) application that allows attackers to overwrite global variables and class attributes in certain Mesop modules during runtime. This vulnerability could directly lead to a denial of service (DoS) attack against the server. Additionally, it could also result in other severe consequences given the application's implementation, such as identity confusion, where an attacker could impersonate an assistant or system role within conversations. This impersonation could potentially enable jailbreak attacks when interacting with large language models (LLMs). Just like the Javascript's prototype pollution, this vulnerability could leave a way for attackers to manipulate the intended data-flow or control-flow of the application at runtime and lead to severe consequnces like RCE when gadgets are available.

CVE-2025-30358 Affected Mesop Versions

1 component(s)
Fixed Versions:
0.14.1
Product / Package Ecosystem Affected Versions Fixed Version
mesop
PyPI
< 0.14.1
0.14.1

References

Frequently Asked Questions

What is CVE-2025-30358?
CVE-2025-30358 is a security vulnerability in Mesop involving Mesop Class Pollution vulnerability leads to DoS and Jailbreak attacks under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes.
Which Mesop versions are affected?
Affected versions include releases prior to 0.14.1 across affected packages: mesop.
What version fixes CVE-2025-30358?
Upgrading to 0.14.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mesop affected?
Yes, mesop is affected in releases prior to 0.14.1. Upgrade your dependency to 0.14.1 or later.
What is the CVSS score of CVE-2025-30358?
CVE-2025-30358 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2025-30358?
CVE-2025-30358 is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes (The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.).
How can I check PyPI dependencies for CVE-2025-30358?
Run the dependency tree command: 'pip show mesop'. 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-f3mf-hm6v-jfhh",
  "modified" : "2025-03-27T18:14:29Z",
  "published" : "2025-03-27T18:14:29Z",
  "aliases" : [ "CVE-2025-30358" ],
  "summary" : "Mesop Class Pollution vulnerability leads to DoS and Jailbreak attacks",
  "details" : "From @jackfromeast and @superboy-zjc:\nWe have identified a class pollution vulnerability in Mesop (<= [0.14.0](https://github.com/mesop-dev/mesop/releases/tag/v0.14.0)) application that allows attackers to overwrite global variables and class attributes in certain Mesop modules during runtime. This vulnerability could directly lead to a denial of service (DoS) attack against the server. Additionally, it could also result in other severe consequences given the application's implementation, such as identity confusion, where an attacker could impersonate an assistant or system role within conversations. This impersonation could potentially enable jailbreak attacks when interacting with large language models (LLMs).\n\nJust like the Javascript's prototype pollution, this vulnerability could leave a way for attackers to manipulate the intended data-flow or control-flow of the application at runtime and lead to severe consequnces like RCE when gadgets are available.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mesop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.14.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mesop-dev/mesop/security/advisories/GHSA-f3mf-hm6v-jfhh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30358"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mesop-dev/mesop/commit/748e20d4a363d89b841d62213f5b0c6b4bed788f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mesop-dev/mesop"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-915" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-27T18:14:29Z",
    "nvd_published_at" : "2025-03-27T15:16:02Z"
  }
}