Severity:

HIGH RISK

(7.3)

SSRF in hm_editor image-to-base64 Endpoint

CVE-2026-5346

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized network access via server-side requests, potentially reaching internal services and sensitive resources

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

hm_editor up to version 2.2.3 contains a server-side request forgery (SSRF) vulnerability in the image-to-base64 endpoint, specifically in the client.get function of src/mcp-server.js.

By manipulating the url argument, a remote attacker can coerce the server into making arbitrary HTTP requests to internal or external resources on behalf of the application.

Affected context

This vulnerability appears in deployments of huimeicloud hm_editor (up to 2.2.3) that expose the image-to-base64 endpoint over a network.

The issue arises when the server accepts a user-controlled url parameter and uses it directly in client.get within src/mcp-server.js to fetch remote images for conversion.

In environments where the hm_editor instance can reach internal services, cloud metadata endpoints, or otherwise non-public network locations, this behavior can become particularly risky.

Exploit preconditions

  • Attack surface: Network-exposed image-to-base64 HTTP endpoint provided by hm_editor.
  • Required access: Ability to send crafted requests to the endpoint (typically unauthenticated or low-privilege access, depending on deployment).
  • Trigger point: Supplying a controlled url value that the server uses in client.get to initiate outbound HTTP requests.
  • Why exploitation is possible: The server trusts the url parameter and forwards it directly to an HTTP client without adequate validation, filtering, or network egress restrictions, allowing attackers to pivot the server as a proxy to arbitrary destinations.

Why this happens

The core issue is unvalidated, user-controlled URL input being used to drive server-side HTTP requests.

The image-to-base64 endpoint accepts a url argument and passes it directly into client.get in src/mcp-server.js, effectively turning the server into an open HTTP proxy.

This maps to CWE-918: Server-Side Request Forgery (SSRF), where a server-side component that can reach internal or sensitive resources is tricked into issuing requests chosen by an attacker.

The lack of allow-listing, scheme restriction, host validation, and network segmentation enables attackers to explore internal networks or access metadata and management services through the vulnerable application.

Potential impact

  • May allow access to internal HTTP(S) services that are not directly exposed to the internet.
  • Could enable interaction with cloud provider instance metadata endpoints, potentially leading to credential exposure or environment takeover.
  • Can be used for network reconnaissance, including port scanning and service enumeration on internal hosts reachable from the server.
  • Might facilitate bypassing IP-based access controls by using the trusted application server as a proxy.
  • Could leak sensitive data returned by internal services if responses are reflected back to the attacker.

General mitigation guidance

Effective mitigation generally centers on constraining outbound requests and validating untrusted URLs before use:

  • Introduce strict allow-listing of permitted domains or hostnames for the image-to-base64 endpoint, rejecting any URL outside of known-safe destinations.
  • Enforce URL parsing and validation rules that restrict schemes (e.g., only https), block private and link-local IP ranges, and disallow direct IP literals where appropriate.
  • Apply network-level egress controls so the hm_editor server can only reach approved external services and cannot directly access internal administration or metadata endpoints.
  • Consider separating image-fetching functionality into a dedicated, low-privilege service with highly constrained network access.
  • Fail closed on URL validation errors, and avoid following redirects to untrusted or unvalidated destinations.

How teams detect issues like this

Organizations can look for SSRF patterns in both code and runtime behavior:

  • Static/code review: Flag uses of HTTP client libraries where URLs include direct user input (e.g., client.get(req.body.url) or similar) without validation, domain checks, or allow-lists.
  • Security policy checks: Enforce coding standards that require URL validation helpers and prohibit direct use of externally supplied URLs in outbound requests.
  • Network monitoring: Monitor outbound traffic from hm_editor instances for unusual destinations, such as internal IP ranges, metadata IP addresses (e.g., 169.254.169.254), or unexpected ports.
  • Automated analysis: Use SAST/IAST tools configured with SSRF-specific rules to identify untrusted URL sinks and missing validation logic across server-side components.

Sources

SourceLink
github.comgithub.com/wing3e/public_exp/issues/11
vuldb.comvuldb.com/submit/781341
vuldb.comvuldb.com/vuln/354701
vuldb.comvuldb.com/vuln/354701/cti

Frequently asked

questions

Yes. As long as the image-to-base64 endpoint is reachable over the network, an attacker can remotely supply crafted url parameters to trigger SSRF behavior.

Typically only the ability to send requests to the vulnerable endpoint is required. Authentication requirements depend on how hm_editor is deployed, but the core issue does not rely on elevated privileges.

The most robust fix is to validate and constrain outbound requests by implementing strict domain/host allow-lists, enforcing safe URL schemes, rejecting internal or ambiguous addresses, and applying principle-of-least-privilege to network egress for the component performing the HTTP requests.

Establish a standard pattern for handling any user-supplied URLs: always parse and validate against a central policy, avoid direct use of untrusted URLs in server-side requests, restrict outbound network access from application servers, and include SSRF checks in code review and automated security testing pipelines.

Find out what's already
exploitable in your codebase.