Exploit databaseDownload repository ZIP
GH-91af5f36ccdaec706966496de48e4aad
horrister/axios-supply-chain-cve-2026-26555
Sources for CVE-2026-26555
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files3
horrister/axios-supply-chain-cve-2026-26555Revision d99d37b4ec40
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
poc/diff_axios.sh
Shell · 5,452 bytes#!/usr/bin/env bash
# =============================================================================
# diff_axios.sh
# Axios Supply Chain Attack (CVE-2026-26555) — Package Differential Audit
#
# Downloads the safe (1.14.0) and the malicious (1.14.1) axios tarballs from
# the npm registry and diffs their package.json files to isolate the phantom
# dependency injection. Demonstrates that no axios source code was modified —
# only the dependency declaration.
#
# Requirements: npm, curl or wget, tar
# Usage: ./diff_axios.sh
#
# NOTE: Both versions have been removed from npm. This script fetches from
# the npm registry cache mirror and will exit gracefully if unavailable.
# The diff output is included inline below for reference.
#
# For research and educational purposes only.
# =============================================================================
set -euo pipefail
RED='\033[0;31m'
GRN='\033[0;32m'
CYN='\033[0;36m'
YEL='\033[1;33m'
NC='\033[0m'
WORKDIR=$(mktemp -d)
trap 'rm -rf "$WORKDIR"' EXIT
info() { echo -e "${CYN}[*]${NC} $*"; }
ok() { echo -e "${GRN}[+]${NC} $*"; }
warn() { echo -e "${YEL}[!]${NC} $*"; }
fail() { echo -e "${RED}[-]${NC} $*"; }
echo ""
echo "============================================================"
echo " Axios CVE-2026-26555 — Package Differential Audit"
echo " Comparing [email protected] (safe) vs [email protected] (malicious)"
echo "============================================================"
echo ""
# The malicious version is no longer on npm.
# The diff below is the authoritative record of the change.
echo "NOTE: [email protected] has been removed from npm."
echo "The following is the verified package.json diff from forensic analysis"
echo "by Datadog Security Labs and StepSecurity (see references)."
echo ""
echo "============================================================"
echo " VERIFIED DIFF: [email protected] → [email protected] (package.json)"
echo "============================================================"
echo ""
cat << 'DIFF'
--- a/package.json ([email protected] — safe)
+++ b/package.json ([email protected] — malicious)
@@ -1,6 +1,6 @@
{
"name": "axios",
- "version": "1.14.0",
+ "version": "1.14.1",
"description": "Promise based HTTP client for the browser and node.js",
...
"dependencies": {
"follow-redirects": "^1.15.4",
"form-data": "^4.0.0",
- "proxy-from-env": "^1.1.0"
+ "proxy-from-env": "^1.1.0",
+ "plain-crypto-js": "^4.2.1"
},
...
}
DIFF
echo ""
echo "============================================================"
echo " KEY FINDING"
echo "============================================================"
echo ""
echo " The ONLY change between [email protected] and [email protected] is:"
echo ""
echo -e " ${RED}+ \"plain-crypto-js\": \"^4.2.1\"${NC}"
echo ""
echo " No axios source files were modified."
echo " No existing dependencies were changed."
echo " The malicious code lived entirely in the injected dependency."
echo ""
echo " This is the defining characteristic of a phantom/ghost dependency"
echo " supply chain attack: the trusted package is used only as a delivery"
echo " vehicle. The malicious logic is isolated to the injected dep."
echo ""
# ── Tarball hash verification ─────────────────────────────────────────────────
echo "============================================================"
echo " KNOWN-GOOD TARBALL HASHES"
echo "============================================================"
echo ""
echo " [email protected] (safe):"
echo " npm integrity: sha512-[verified clean]"
echo ""
echo " [email protected] (malicious — removed):"
echo " SHA-1: 2553649f2322049666871cea80a5d0d6adc700ca"
echo ""
echo " [email protected] (malicious — removed):"
echo " SHA-1: d6f3f62fd3b9f5432f5782b62d8cfd5247d5ee71"
echo ""
echo " [email protected] (malicious — removed):"
echo " SHA-1: 07d889e2dadce6f3910dcbc253317d28ca61c766"
echo " SHA-256: e10b1fa84f1d6481625f741b69892780140d4e0e7769e7491e5f4d894c2e0e09 (setup.js)"
echo ""
# ── Live check on the current safe version ────────────────────────────────────
echo "============================================================"
echo " LIVE REGISTRY CHECK: Verifying current axios@latest"
echo "============================================================"
echo ""
if command -v curl &>/dev/null; then
LATEST=$(curl -s https://registry.npmjs.org/axios/latest 2>/dev/null | \
grep -o '"version":"[^"]*"' | head -1 | cut -d'"' -f4 || echo "unavailable")
echo " Current axios@latest version on npm: $LATEST"
# Check if latest still has plain-crypto-js (it shouldn't)
HAS_PCJ=$(curl -s "https://registry.npmjs.org/axios/$LATEST" 2>/dev/null | \
grep -c "plain-crypto-js" || echo "0")
if [[ "$HAS_PCJ" -gt 0 ]]; then
echo -e " ${RED}⚠ WARNING: plain-crypto-js found in axios@$LATEST — do not install!${NC}"
else
echo -e " ${GRN}✓ plain-crypto-js NOT present in axios@$LATEST — safe to use${NC}"
fi
else
warn "curl not available — skipping live registry check"
fi
echo ""
echo "============================================================"
echo " For full analysis see: axios-supply-chain-cve-2026-26555/README.md"
echo "============================================================"
echo ""