/

CVE-2026-70558

Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload (CWE-434) in Dinky Download

CVE-2026-70558

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Arbitrary File Write and Potential Code Execution

Severity:

CRITICAL RISK

(9.8)

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

Dinky's local upload handler accepts a caller-controlled filesystem path and writes uploaded content without validating the destination. When the service is reachable and the shared authentication token is known or unchanged, an attacker may overwrite application files, static assets, or classpath resources as the Dinky service account.

Affected context

The issue occurs in Dinky deployments exposing the /download/uploadFromRsByLocal handler, particularly where the /download/** routes bypass the normal authentication interceptor. Risk is increased when the default shared token remains in use, the service is reachable without an additional proxy or authentication layer, and the application directory is writable by the Dinky service account. The practical impact depends on filesystem permissions, deployment layout, and whether overwritten files are later served, loaded, or executed.

Exploit preconditions

  • Attack surface: The Dinky HTTP upload endpoint, commonly exposed on the application port
  • Required access: Network reachability to the Dinky service and knowledge of the accepted shared token, including deployments that retain the shipped default
  • Trigger point: A request to the local upload handler with attacker-controlled file content and destination path
  • Why exploitation is possible: The supplied path is passed to file creation and transfer operations without canonicalization, allowlisting, or confinement to a designated upload directory
  • Privilege boundary: Files are written with the permissions of the Dinky service account, so impact is constrained by that account's filesystem privileges

Why this happens

The handler treats an untrusted path parameter as a trusted filesystem destination and performs a server-side write without enforcing a safe storage boundary. This is an unrestricted file upload condition mapped to CWE-434, compounded by insufficient authorization and a shared hardcoded credential. The insecure pattern allows user-controlled input to influence the name and location of a file that the application creates or overwrites, including files within application-owned directories.

Potential impact

  • An attacker may overwrite static assets and serve malicious content to administrative users
  • An attacker may tamper with application configuration, scripts, or other runtime resources
  • The service may execute attacker-controlled code when modified classpath or startup resources are subsequently loaded
  • The Dinky application account could be compromised
  • Data integrity, administrative sessions, and application availability could be affected
  • Further compromise may be possible where the service account has access to connected systems or sensitive data

General mitigation guidance

Mitigation generally focuses on removing caller control over filesystem destinations and separating upload storage from executable application resources.

Common defensive patterns include:

  • Restricting uploads to a dedicated, non-executable directory selected by the server
  • Allowlisting permitted file types, names, and destination identifiers rather than accepting arbitrary paths
  • Canonicalizing paths and rejecting traversal, absolute paths, symlinks, and destinations outside the approved directory
  • Requiring strong, deployment-specific authentication and authorization for upload operations
  • Replacing shared or source-controlled default secrets with securely provisioned per-deployment credentials
  • Applying read-only permissions to application code, classpath directories, startup scripts, and static assets
  • Running the service with the minimum filesystem and operating-system privileges required
  • Serving uploaded content from a separate origin or disabling active content where feasible

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis rules that flag user-controlled values passed to file constructors, copy operations, or transfer methods
  • Code review checks for upload handlers that accept paths, filenames, or storage locations from requests
  • Route and policy audits for ignored authentication annotations, interceptor exclusions, and shared default credentials
  • Runtime monitoring of writes by the Dinky account to application directories, classpath locations, startup scripts, and static assets
  • File integrity monitoring for unexpected changes to deployed resources
  • Web application tests that verify traversal, absolute-path, symlink, and unauthorized-destination rejection
  • Automated review tools that correlate upload functionality with missing path confinement and authorization controls

Sources

SourceLink
github.comgithub.com/DataLinkDC/dinky
github.comgithub.com/DataLinkDC/dinky/issues/4566
github.comgithub.com/DataLinkDC/dinky/security/advisories/GHSA-2p66-w3p3-5226

Frequently asked

questions

It may be remotely exploitable when the Dinky HTTP port is reachable and the attacker can satisfy the handler's token check. Exposure, network controls, and deployment-specific authentication determine the practical scope.

The attacker needs network access to the affected endpoint and the accepted token. Deployments using the shipped shared default or otherwise exposing the endpoint without an additional authentication layer are at greater risk.

Do not allow request data to select arbitrary filesystem destinations. Store uploads in a server-chosen, non-executable directory, enforce canonical-path and file-type restrictions, and protect the operation with strong authorization.

Review upload routes and authentication exclusions, eliminate default shared secrets, apply least-privilege filesystem permissions, monitor application directories for unexpected writes, and keep executable resources separate from user-controlled content.

Find out what's already
exploitable in your codebase.