GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unauthenticated LAN attacker can achieve arbitrary code execution on any SoloPi Android device via the unauthenticated control HTTP server and unsigned dynamic patch loader · Issue #226 · alipay/SoloPi

Unauthenticated LAN attacker can achieve arbitrary code execution on any SoloPi Android device via the unauthenticated control HTTP server and unsigned dynamic patch loader #226

New issue
Copy link
New issue
Copy link
Closed
#229
Closed
Unauthenticated LAN attacker can achieve arbitrary code execution on any SoloPi Android device via the unauthenticated control HTTP server and unsigned dynamic patch loader#226
#229
Copy link
Labels
bugSomething isn't working

Description

@geo-chen
geo-chen
opened on Jul 18, 2026
Issue body actions

version: v0.12.0

Summary

SoloPi starts an embedded NanoHTTPD server on every device it runs on, listening on TCP port 23342 (configurable, default 23342) on all network interfaces, with no authentication of any kind. This server exposes a generic "scheme" bridge that lets any caller invoke internal app actions by name, including a config action that can set arbitrary application settings — among them KEY_PATCH_URL, the URL SoloPi uses to fetch a "hot patch" manifest and dynamically load and execute Java/DEX code into its own process. The patch loader's only integrity check is an MD5 hash that is supplied by the same untrusted manifest/zip the attacker controls, i.e. it is not a real integrity check at all. Because PatchRequest.updatePatchList() is invoked unconditionally every time the app's home screen (IndexActivity) is opened, an attacker who can merely send one unauthenticated HTTP GET to the device's control port can plant a malicious patch URL and obtain arbitrary code execution in the SoloPi process — with all of SoloPi's granted permissions (storage, ADB debugging bridge, accessibility service, screen capture, etc.) — the next time anyone opens the app.

Details

1. Unauthenticated control HTTP server, bound to all interfaces

src/common/src/main/java/com/alipay/hulu/common/http/HttpServer.java (extends NanoHTTPD):

public HttpServer(int port) {
    super(port);
    listeners = new ArrayList<>();
}
...
@Override
public Response serve(IHTTPSession session) {
    String url = session.getUri();
    Map<String, String> requestParam = session.getParms();
    if (Method.POST.equals(session.getMethod())) {
        ...
    } else {
        for (OnUrlRequestListener listener: listeners) {
            Response res = listener.onGet(url, requestParam);
            if (res != null) {
                return res;
            }
        }
        return NanoHTTPD.newFixedLengthResponse(Response.Status.OK, "text/html", FAIL_RESPONSE_NO_PROCESS);
    }
}

There is no session/token/credential check anywhere in this class. src/common/src/main/java/com/alipay/hulu/common/application/LauncherApplication.java:275 starts it automatically 5 seconds after app launch:

startHttpServerAtPort(SPService.getInt(SPService.KEY_CONTROL_PORT, 23342));
schemeListener = new SchemeHttpListener();
registerControlListener(schemeListener);

NanoHTTPD's default constructor (super(port), no hostname argument) binds to the wildcard address, confirmed empirically: netstat on the running device shows tcp6 0 0 :::23342 :::* LISTEN.

2. The config scheme lets any caller set KEY_PATCH_URL

src/common/src/main/java/com/alipay/hulu/common/scheme/SchemeHttpListener.java bridges GET /scheme/<action>?<params> straight into the app's internal scheme-resolver dispatch with no auth check:

public static final String LISTEN_PATH = "/scheme/";

@Override
public NanoHTTPD.Response onGet(String url, Map<String, String> params) {
    if (StringUtil.startWith(url, LISTEN_PATH)) {
        String realPath = url.substring(LISTEN_PATH.length());
        return doSchemeJump(LauncherApplication.getInstance().getSchemeResolver(), realPath, params);
    }
    return null;
}

src/app/src/main/java/com/alipay/hulu/scheme/ConfigSchemeResolver.java:81-86 handles action config and, among other keys, writes KEY_PATCH_URL straight to SharedPreferences from the untrusted request:

case KEY_ADB_SERVER:
case KEY_PATCH_URL:
case KEY_PERFORMANCE_UPLOAD:
    LogUtil.i(TAG, "Update Config " + key + " to value " + value);
    SPService.putString(key, value);
    break;

3. The patch URL is fetched and installed automatically on every app launch

src/app/src/main/java/com/alipay/hulu/activity/IndexActivity.java:244 — unconditionally, in onCreate of the app's home screen:

PatchRequest.updatePatchList(null);

src/app/src/main/java/com/alipay/hulu/upgrade/PatchRequest.java:69-101:

public static void updatePatchList(final LoadPatchCallback callback) {
    String storedUrl = SPService.getString(SPService.KEY_PATCH_URL,
        "https://raw.githubusercontent.com/alipay/SoloPi/master/<abi>.json");
    ...
    HttpUtil.get(realUrl, new HttpUtil.Callback<PatchResponse>(PatchResponse.class) {
        @Override
        public void onResponse(Call call, PatchResponse item) throws IOException {
            doUpgradePatch(item);
            ...

doUpgradePatch() downloads and installs any manifest entry of type: "base" or type: "required" unconditionally (no signature/allowlist check on the URL host).

4. The only "integrity check" on the downloaded code is self-referential

src/common/src/main/java/com/alipay/hulu/common/utils/PatchProcessUtil.java:118-121:

String jar = patchDesc.getJar();
String jarMd5 = patchDesc.getJarMd5();
if (!StringUtil.isEmpty(jar)) {
    File jarFile = new File(outFolder, jar);
    if (!FileUtils.checkFileMd5(jarFile, jarMd5)) {
        throw new PatchProcessException("Jar File " + jarFile + "doesn't match its md5", outFolder);
    }

Both the jar file and its declared MD5 (jarMd5) come from the same attacker-hosted zip — the attacker simply computes the MD5 of their own malicious jar and puts it in desc.json. There is no code signing, no pinned public key, and no allowlist of trusted hosts anywhere in this flow.

5. The loaded code executes automatically via the service-registration mechanism

ClassUtil.installPatch() (src/common/src/main/java/com/alipay/hulu/common/utils/ClassUtil.java:649-697) calls loadPatch() (loads every class in the dropped DEX via a custom PatchClassLoader) and then:

// 最后再更新Patch中的Services信息
LauncherApplication.getInstance().registerPatchServices(patch);

LauncherApplication.registerPatchServices() (line 477) scans the patch's classes for implementations of ExportService annotated @LocalService, and for any non-lazy one, instantiates it and calls onCreate(context) immediately — i.e. attacker-supplied code runs with no further trigger needed.

PoC

(available upon request)

Impact

Any host that can route a single unauthenticated HTTP request to a SoloPi-running device's port 23342 (same Wi-Fi network, shared test-lab LAN, USB-tethered network, hostile access point, etc.) can obtain persistent arbitrary code execution inside the SoloPi app process the next time the device owner opens the app — which the app's own onboarding flow already prompts the user to do. Because SoloPi is a UI-automation and device-control tool, its process typically holds storage, Accessibility Service, and ADB-adjacent capabilities, so code execution here yields the ability to read/write app data, drive the Accessibility Service to interact with arbitrary other apps on the device (including whatever the device is used to test, which for an Ant Financial-authored QA tool plausibly includes financial/payment apps), capture the screen, and persist by re-registering itself as a @LocalService on every future launch. No authentication, no social engineering beyond normal app use, and only network-adjacency to the victim device are required.

Activity

  1. geo-chen
    added
    bugSomething isn't working
    on Jul 18, 2026
  2. Lzm1645 commented on Oct 19, 2026

    @Lzm1645
    Lzm1645
    on Oct 19, 2026
    Collaborator
    More actions

    Thank you for the detailed report. The source-level mitigation for the reported LAN attack chain is now in master, with additional startup hardening merged in #228.

    The current control server binds to 127.0.0.1, and the HTTP scheme bridge rejects configuration mutations, including changes to the patch URL. #228 also makes automatic startup updates use the official default patch source instead of a previously stored custom URL; a custom source can still be refreshed explicitly through the app UI. Regression tests were added for these boundaries.

    Verification is not complete: the new Android JVM tests have not yet been run in our environment, and we have not verified the listener or exploit path on a device. This change also does not add cryptographic signature verification for patch artifacts; the existing MD5 checks should not be treated as authenticity protection. We are keeping this issue open pending those checks and assessment of the remaining patch trust risk. No release containing #228 has been published as part of this update.

  3. Lzm1645
    closed this as completedin #229on Oct 19, 2026
  4. Lzm1645 commented on Oct 19, 2026

    @Lzm1645
    Lzm1645
    on Oct 19, 2026
    Collaborator
    More actions

    Follow-up: the signed patch-loading gate and patch-artifact migration have now been merged in #229. New dynamic patch archives must include a detached SHA256withRSA signature over the exact desc.json bytes before executable content is loaded; stored patches are re-verified at startup. Signed v7a and v8a screen-recording artifacts are published in the immutable patch-signing-2026-v1 release. The armeabi index no longer advertises a plugin because the historical v0.12.0 artifact was not available to migrate.

    Scope note: Android unit tests, APK build, device verification of loopback binding and stale installed-patch rejection, and end-to-end regression on supported devices are still pending. No APK release containing this new gate has been published. This issue is currently closed; this comment records the remaining validation work so the closure is not interpreted as completed device-level verification.

  5. Lzm1645 commented on Oct 19, 2026

    @Lzm1645
    Lzm1645
    on Oct 19, 2026
    Collaborator
    More actions

    Reopening to track the outstanding Android build and device-level validation described above. The code changes and signed artifacts are merged and published, but those remaining checks have not yet been completed.

  6. Lzm1645
    reopened this on Oct 19, 2026
  7. Lzm1645 commented on Oct 19, 2026

    @Lzm1645
    Lzm1645
    on Oct 19, 2026
    Collaborator
    More actions

    Validation update: #230 is now merged to make the production patch-signature vector executable in the Android module JVM test environment without relying on an unmocked Android Base64 API. The pinned key and SHA256withRSA verification algorithm are unchanged.

    Completed locally against the merged change set:

    • full testDebugUnitTest Gradle suite: passed (114 actionable tasks)
    • :portal:assembleDebug: passed (131 actionable tasks)
    • generated debug APK v1/v2 signature verification: passed

    The generated APK is debug-signed and has not been released. adb devices -l reported no connected device, so loopback listener behavior, signed patch installation, rejection of stale unsigned installed patches, and full exploit-path regression remain pending device validation.

  8. geo-chen commented on Oct 19, 2026

    @geo-chen
    geo-chen
    on Oct 19, 2026
    Author
    More actions

    thanks @Lzm1645 - can we assign a CVE through a GHSA here to track this please?

  9. YuriyPikachu
    added a commit that references this issue on Oct 21, 2026

    fix(security): bind cached patches to signed loader metadata

    bf26516
  10. YuriyPikachu
    closed this as completedon Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.