cloudflare-images
Audited by Socket on Sep 15, 2026
12 alerts found:
Anomalyx11SecurityThe fragment is legitimate Cloudflare Images migration documentation and shows no clear malware or supply-chain sabotage. It does contain security-sensitive patterns: unauthenticated webhook actions and potentially untrusted URL fetching can enable unauthorized image imports/deletions, SSRF-like behavior, or resource abuse if incorporated without additional controls. API token use is expected and is not harvested or exfiltrated to a suspicious destination.
No clear malicious behavior or supply-chain backdoor is present. The code implements Cloudflare image uploads and URL generation. The primary risks are an apparently unauthenticated upload endpoint, spoofable X-User-ID metadata, reliance on client-controlled MIME types, and missing rate or quota controls. The Cloudflare API token remains server-side in the shown code.
The code appears to be a legitimate Cloudflare Images variant-management module and contains no clear malware, exfiltration, backdoor, or obfuscation indicators. It has a significant application security issue: unauthenticated endpoints expose Cloudflare variant listings and permit arbitrary variant creation using the worker's privileged API token. Add authentication and authorization, validate request fields and dimensions at runtime, constrain variant IDs, and check upstream HTTP status and response schemas. The provided fragment also appears truncated or syntactically incomplete at the end.
The code appears to be a legitimate Cloudflare usage-reporting script and contains no clear malware or unauthorized data-exfiltration behavior. The main security concerns are trusted-file shell execution through .env, accidental credential export caused by set -a, bearer-token exposure in the curl process arguments, incomplete cleanup on error, and lack of strict validation for values used in URL and arithmetic operations. Use only with a trusted 0600 .env file, avoid placing secrets in process arguments, validate all numeric/API fields, and clean up credentials with a trap.
The code is readable and appears to implement legitimate image URL signing, with no clear malicious or supply-chain attack behavior. It has meaningful security weaknesses if the fetch endpoint is publicly exposed: lack of authentication, unrestricted image and variant selection, inadequate expiry validation, and unsafe path interpolation. The signing key itself is not directly leaked. Validate and bound expiry, encode or strictly validate path components, add authorization/rate limiting as appropriate, use unambiguous signing input, and consider constant-time signature comparison.
The code is not indicative of malware, but the upload endpoint has meaningful access-control and abuse risks. Any origin and unauthenticated caller can mint Cloudflare Images upload URLs using the server's account privileges, potentially consuming storage or uploading unauthorized content. Wildcard CORS amplifies this exposure. Restrict origins, authenticate and authorize callers, validate input, consider defaulting requireSignedURLs to true, enforce rate limits, and URL-encode or validate imageId before constructing API paths.
No clear malware, data exfiltration, backdoor, cryptomining, or suspicious network behavior is present. The principal security concerns are missing endpoint authentication/authorization, unrestricted upload capability, unrestricted signing of arbitrary image IDs and variants, and unbounded expiry input. These issues could allow unauthorized image storage and issuance of access URLs if the routes are publicly reachable. The apparent incomplete app.use statement may also make the fragment invalid JavaScript/TypeScript.
The code is a readable image URL and responsive HTML helper with no apparent malicious behavior. The primary security issue is potential XSS because alt is not HTML-escaped before interpolation. Unvalidated imagePath and runtime option values can also produce malformed or manipulated transformation URLs. Escape HTML attribute values, validate or safely encode image paths and option values, and avoid rendering the returned string as trusted HTML without sanitization.
The script is an intended Cloudflare Images connectivity test and contains no clear malicious payload. The primary security concern is sourcing .env as executable shell code, which permits arbitrary code execution if that file is untrusted or modified. Additionally, the bearer token is passed in curl arguments and may be observable through process inspection, and secret cleanup is not guaranteed on failure. Use only a trusted .env with restrictive permissions, consider parsing it without execution, avoid exposing tokens in command-line arguments where possible, and add an EXIT trap for cleanup.
The code is ordinary Cloudflare Images integration and shows no clear malware or supply-chain backdoor. It has a meaningful SSRF/privacy risk because arbitrary URLs are forwarded to a remote image-fetching API, and the incomplete private-URL helper suggests unsafe credential embedding if implemented as implied. Restrict allowed URL schemes and destinations, enforce authorization and batch limits, and avoid embedding credentials in URLs.
The code is primarily a legitimate Cloudflare signed-URL utility and contains no evident malware, persistence, credential harvesting, reverse shell, or suspicious third-party network destination. However, directly sourcing .env permits arbitrary code execution if that file is tampered with, and set -a contradicts the stated secret-handling guarantee by exporting sourced secrets. Passing the signing key via an openssl command-line argument and failing to validate numeric/user-controlled inputs are additional security concerns. Use only with a trusted, mode-restricted .env, validate arguments strictly, and avoid command-line secret exposure.
The code implements a legitimate Cloudflare Images upload proxy and contains no clear malware or supply-chain backdoor. Its main security concerns are unauthenticated and unrestricted uploads, lack of file validation and resource limits, potential quota or storage abuse, and deliberately public image variants. The Cloudflare API token is used in an expected server-side manner and is not sent to the client.