CVE-2026-70558
Beschrijving NL
Dinky's POST /download/uploadFromRsByLocal-handler geeft de door de beller geleverde padparameter rechtstreeks door aan nieuw bestand(pad) en bestand.transferTo (bestemming) zonder padvalidatie. De route is gemarkeerd als @SaIgnore en /download/** is uitgesloten van de Sa-Token-interceptor, dus de enige bewaker is een gelijkheidscontrole van de header tegen een dinkyToken-waarde waarvan de standaard (efda1551-7958-4e0f-80a8-dfd107df3e38) hard gecodeerd is in de bron en naar elke implementatie wordt verzonden. Iedereen die de HTTP-poort van Dinky kan bereiken (standaard 8888) en het hardgecodeerde token levert, kan willekeurige bestanden schrijven als het Dinky-serviceaccount. Het standaard Docker-image draait op 8888 zonder proxy of authenticatie en chmod 777 op /opt/dinky, dus de eigen classpath, opstartscripts en statische assets van de applicatie zijn beschrijfbaar. Aantoonbare impact: overschrijven /opt/dinky/config/static/index.html diende aanvaller JavaScript onmiddellijk toe aan admin browsers, en schrijven /opt/dinky/org/dinky/Dinky.class voerde aanvallercode uit als het Dinky-serviceaccount bij de volgende JVM start via een classpath-shadow gelanceerd door script/bin/auto.sh. Schrijven zijn uid 9999 (flink), niet root, dus /etc, /root, /home en /usr worden geweigerd. Heeft invloed op Dinky v1.2.5 (de huidige release) en de ontwikkelingstak, waar de code byte-identiek is.
Origineel (Engels) tonen
Dinky's POST /download/uploadFromRsByLocal handler passes the caller-supplied path parameter directly to new File(path) and file.transferTo(dest) with no path validation. The route is marked @SaIgnore and /download/** is excluded from the Sa-Token interceptor, so the only guard is a header equality check against a dinkyToken value whose default (efda1551-7958-4e0f-80a8-dfd107df3e38) is hardcoded in source and shipped to every deployment. Anyone who can reach Dinky's HTTP port (8888 by default) and supplies the hardcoded token can write arbitrary files as the Dinky service account. The default Docker image runs on 8888 with no proxy or authentication and chmod 777 on /opt/dinky, so the application's own classpath, launch scripts, and static assets are writable. Demonstrated impact: overwriting /opt/dinky/config/static/index.html served attacker JavaScript to admin browsers immediately, and writing /opt/dinky/org/dinky/Dinky.class executed attacker code as the Dinky service account at the next JVM start via a classpath-shadow launched by script/bin/auto.sh. Writes are uid 9999 (flink), not root, so /etc, /root, /home, and /usr are refused. Affects Dinky v1.2.5 (the current release) and the development branch, where the code is byte-identical.