{
  "id": "CVE-2021-20038",
  "url": "https://poc.griffinguard.io/cve/CVE-2021-20038",
  "published_at": "2021-12-08T09:55:20Z",
  "title": "SonicWall SMA 100 Appliances Stack-Based Buffer Overflow Vulnerability",
  "vendor": "SonicWall",
  "product": "SonicWall SMA100",
  "cvss": {
    "score": 9.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": true,
    "added_at": "2022-01-28",
    "known_ransomware_campaign_use": "Known",
    "days_after_publication": 51
  },
  "first_poc": {
    "created_at": "2022-01-11T02:25:25Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 33.7,
    "repo": "jbaines-r7/badblood",
    "source": "github"
  },
  "poc_repo_count": 2,
  "exploit_count": 1,
  "suspicious_repo_count": 0,
  "edge_device": {
    "category": "Firewall / VPN",
    "confidence": "high",
    "reason": "known edge product: SonicWall SonicWall SMA100 SonicWall SMA 100 Appliances"
  },
  "description": "A Stack-based buffer overflow vulnerability in SMA100 Apache httpd server's mod_cgi module environment variables allows a remote unauthenticated attacker to potentially execute code as a 'nobody' user in the appliance. This vulnerability affected SMA 200, 210, 400, 410 and 500v appliances firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv and earlier versions.",
  "cwe": "CWE-121",
  "cvss_by_source": {
    "cisa-adp": 9.8
  },
  "repos": [
    {
      "repo": "ExploitPwner/CVE-2021-20038-Mass-RCE-SonicWall",
      "url": "https://github.com/ExploitPwner/CVE-2021-20038-Mass-RCE-SonicWall",
      "created_at": null,
      "first_seen_at": "2026-11-14T23:12:49.679Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "XmasSnowREAL/CVE-2021-20038-Mass-RCE",
      "url": "https://github.com/XmasSnowREAL/CVE-2021-20038-Mass-RCE",
      "created_at": null,
      "first_seen_at": "2026-11-14T23:12:49.679Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "jbaines-r7/badblood",
      "url": "https://github.com/jbaines-r7/badblood",
      "created_at": "2022-01-11T02:25:25Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 95,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-10-05T14:26:56Z"
    },
    {
      "repo": "vesperp/CVE-2021-20038-SonicWall-RCE",
      "url": "https://github.com/vesperp/CVE-2021-20038-SonicWall-RCE",
      "created_at": "2022-08-08T03:38:06Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-04-29T12:31:12Z"
    },
    {
      "repo": "anir0y/sonicwall-audit-toolkit",
      "url": "https://github.com/anir0y/sonicwall-audit-toolkit",
      "created_at": "2026-02-23T17:27:58Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "no",
      "kind": "list",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-07-02T04:37:05Z"
    }
  ],
  "remediation": null,
  "exploit_refs": [
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-20038.yaml",
      "source": "nuclei",
      "title": "nuclei template: SonicWall SMA100 Stack - Buffer Overflow/Remote Code Execution",
      "published_at": null,
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/cgi-bin/jarrewrite.sh",
      "user_agents": [
        "() {var}; echo ; /bin/bash -c id"
      ],
      "protocol": "http",
      "repos": [
        "vesperp/CVE-2021-20038-SonicWall-RCE"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "vesperp/CVE-2021-20038-SonicWall-RCE/SonicWall-rebuild.py:25",
        "vesperp/CVE-2021-20038-SonicWall-RCE/SonicWall-rebuild.py:43"
      ]
    },
    {
      "method": "GET",
      "path_template": "/cgi-bin/welcome",
      "protocol": "https",
      "repos": [
        "jbaines-r7/badblood"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "jbaines-r7/badblood/README.md:74"
      ]
    }
  ],
  "rules": []
}
