SecurityContext

CVE-2021-37840: aaPanel - Command Injection

  • Cve: CVE-2021-37840
  • Name: aaPanel - Command Injection
  • Description: aaPanel through 6.8.12 allows Cross-Site WebSocket Hijacking (CSWH) involving OS commands within WebSocket messages at a ws:// URL for /webssh (the victim must have configured Terminal with at least one host). Successful exploitation depends on the browser used by a potential victim (e.g., exploitation can occur with Firefox but not Chrome).
  • Impact: Attackers can hijack WebSocket sessions and execute OS commands, potentially leading to unauthorized access or control over the server.
  • Remediation: Update to the latest version of aaPanel that addresses this vulnerability or apply security patches to prevent WebSocket message manipulation.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution, client_script_exec
  • Requirement type: user_interaction
  • Requirements: Victim must have configured Terminal with at least one host and use a vulnerable browser like Firefox.
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.01669
  • Epss percentile: 0.7726
  • Assignee: [email protected]
  • Published at: 2021-08-02T14:15:07Z
  • Age in days: 1940
  • Modified at: 2026-06-17T04:01:11Z
  • Public exploits total: 3
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-37840
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: hackerone

Cwe

IdName
NVD-CWE-noinfo—

Public exploits

UrlSourceAdded date
https://github.com/aaPanel/aaPanel/issues/74nvd2021-08-02
https://ssd-disclosure.com/ssd-advisory-aapanel-cswh-to-rce/nvd2021-08-02
https://github.com/EonSecurity/aapanel-ws-bypasspoc-in-github2026-06-23

References

UrlSourceTags
https://github.com/aaPanel/aaPanel/issues/74nvdExploit, Third Party Advisory
https://ssd-disclosure.com/ssd-advisory-aapanel-cswh-to-rce/nvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
aapanel:aapanel<= 6.8.12nonvd/v1/products/aapanel/aapanel

Projects

RepositoryLink kindsIndexedUrl
aaPanel/aaPanelissuesyes/v1/repositories/aaPanel/aaPanel

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 3
  • Public exploit first date: 2021-08-02
  • Remote: yes
  • Exposed hosts: 229
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports