Vulnerabilities in pkg:pypi/comfy-cli

PACKAGE
Advisory Identifier: GHSA-562r-8445-54r2
Advisory Summary

CVE-2026-22777 is a HIGH (CVSS 7.5) comfyui-manager is vulnerable to crlf vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Comfy cli libraries in the PyPI ecosystem. The issue involves comfyui-manager is vulnerable to crlf injection in configuration handler. Remediation is available by upgrading affected packages to version 4.0.5, 3.39.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/comfy-cli

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/comfy-cli. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-562r-8445-54r2 CVE-2026-22777 HIGH ComfyUI-Manager is Vulnerable to CRLF Injection in Configuration Handler

CVE-2026-22777 at a Glance

CVE Identifier CVE-2026-22777
GHSA Identifier GHSA-562r-8445-54r2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product Comfy cli
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2026-22777

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

comfy-cli fixed: 4.0.5
pip install comfy-cli>=4.0.5
comfy-cli fixed: 3.39.2
pip install comfy-cli>=3.39.2
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 comfy-cli

How to Check if You Are Affected

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

pip show comfy-cli

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In Comfy cli, 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 **Vulnerability Type**: CRLF Injection via ConfigParser An attacker can inject special characters into HTTP query parameters to add arbitrary configuration values to the `config.ini` file. This can lead to security setting tampering or modification of application behavior. **Affected Users**: Users running ComfyUI-Manager in environments where ComfyUI is configured with the `--listen` option to allow remote access. **CVSS Score**: 7.5 (High) ## Patches Fixed in the following versions: - **3.39.2** (v3.x branch) - **4.0.5** (v4.x branch) Sanitization logic was added to the `write_config()` function to remove CRLF and NULL characters from all string values. ## Workarounds If upgrading is not possible: - Run ComfyUI-Manager only on trusted networks - Block external access via firewall - Run on localhost only without the `--listen` option ## References - [CWE-93: Improper Neutralization of CRLF Sequences](https://cwe.mitre.org/data/definitions/93.html) - [OWASP CRLF Injection](https://owasp.org/www-community/vulnerabilities/CRLF_Injection) ## Credit This vulnerability was reported by: - 李存义 <xiaoheihei1107@gmail.com> - D0n9 Li <wyd0n9@gmail.com> - Swings <swing@mail.exp.sh> - Osword from SGLAB of Legendsec at Qi'anxin Group <zhzhdoai@gmail.com>

CVE-2026-22777 Affected Comfy cli Versions

2 component(s)
Fixed Versions:
4.0.53.39.2
Product / Package Ecosystem Affected Versions Fixed Version
comfy-cli
PyPI
≥ 4.0.0
< 4.0.5
4.0.5
comfy-cli
PyPI
< 3.39.2
3.39.2

References

Frequently Asked Questions

What is CVE-2026-22777?
CVE-2026-22777 is a security vulnerability in Comfy cli involving ComfyUI-Manager is Vulnerable to CRLF Injection in Configuration Handler under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Comfy cli versions are affected?
Affected versions include releases prior to 4.0.5, 3.39.2 across affected packages: comfy-cli.
What version fixes CVE-2026-22777?
Upgrading to 4.0.5, 3.39.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is comfy-cli affected?
Yes, comfy-cli is affected in releases prior to 4.0.5, 3.39.2. Upgrade your dependency to 4.0.5, 3.39.2 or later.
What is the CVSS score of CVE-2026-22777?
CVE-2026-22777 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-22777?
CVE-2026-22777 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check PyPI dependencies for CVE-2026-22777?
Run the dependency tree command: 'pip show comfy-cli'. 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-562r-8445-54r2",
  "modified" : "2026-06-10T18:06:48Z",
  "published" : "2026-01-13T19:02:52Z",
  "aliases" : [ "CVE-2026-22777" ],
  "summary" : "ComfyUI-Manager is Vulnerable to CRLF Injection in Configuration Handler",
  "details" : "## Impact\n\n**Vulnerability Type**: CRLF Injection via ConfigParser\n\nAn attacker can inject special characters into HTTP query parameters to add arbitrary configuration values to the `config.ini` file. This can lead to security setting tampering or modification of application behavior.\n\n**Affected Users**: Users running ComfyUI-Manager in environments where ComfyUI is configured with the `--listen` option to allow remote access.\n\n**CVSS Score**: 7.5 (High)\n\n## Patches\n\nFixed in the following versions:\n- **3.39.2** (v3.x branch)\n- **4.0.5** (v4.x branch)\n\nSanitization logic was added to the `write_config()` function to remove CRLF and NULL characters from all string values.\n\n## Workarounds\n\nIf upgrading is not possible:\n- Run ComfyUI-Manager only on trusted networks\n- Block external access via firewall\n- Run on localhost only without the `--listen` option\n\n## References\n\n- [CWE-93: Improper Neutralization of CRLF Sequences](https://cwe.mitre.org/data/definitions/93.html)\n- [OWASP CRLF Injection](https://owasp.org/www-community/vulnerabilities/CRLF_Injection)\n\n## Credit\n\nThis vulnerability was reported by:\n- 李存义 <xiaoheihei1107@gmail.com>\n- D0n9 Li <wyd0n9@gmail.com>\n- Swings <swing@mail.exp.sh>\n- Osword from SGLAB of Legendsec at Qi'anxin Group <zhzhdoai@gmail.com>",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "comfy-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.0.4"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "comfy-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.39.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Comfy-Org/ComfyUI-Manager/security/advisories/GHSA-562r-8445-54r2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22777"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Comfy-Org/ComfyUI-Manager/commit/ef8703a3d7ab4e6ecda8f96e0c5816c23d1cb262"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Comfy-Org/ComfyUI-Manager/commit/f4fa394e0f03b013f1068c96cff168ad10bd0410"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Comfy-Org/ComfyUI-Manager"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-13T19:02:52Z",
    "nvd_published_at" : "2026-01-10T07:16:03Z"
  }
}