☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-53861

CVE-2025-53861 Cross-Site Scripting in Ansible
📅 PUBLISHED: 2025-07-11 12:44 UTC 🔄 UPDATED: 2026-10-13 23:19 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.10%
👁️
0.10% probability
2.5× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
Country: USA License: Commercial
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
3.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-53861 identifies a security flaw in Ansible where sensitive cookies are transmitted without security flags (such as Secure, HttpOnly, or SameSite) over non-encrypted channels. This vulnerability exposes the application to Man-in-the-Middle (MitM) attacks, allowing an attacker to intercept and read transmitted data, and potentially to Cross-Site Scripting (XSS) attacks if the cookie is accessible to client-side scripts. The lack of encryption and security flags on cookies undermines the confidentiality and integrity of session data.

⚡ 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

Supply Chain & Package Security

This vulnerability affects the Ansible ecosystem, which is a widely used automation tool. Since Ansible is often deployed in DevOps pipelines and infrastructure management, a compromise of cookie security could lead to lateral movement within an organization's network. The absence of a patch or official advisory from the vendor increases the risk, as users must rely on manual configuration changes to mitigate the issue.

CVSS Breakdown & Threat Level

The CVSS score is reported as 0.0, which is likely a placeholder or uncalculated value. Based on the description, a reasonable CVSS v3.1 vector would be:

  • Attack Vector (AV): Network (N) – The attack can be launched remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): High (H) – Sensitive data can be read.
  • Integrity (I): Low (L) – Potential for XSS, but not direct data modification.
  • Availability (A): None (N) – No impact on availability.

Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N Estimated Base Score: 8.2 (High)

Threat Level: High – The vulnerability is easily exploitable over the network and can lead to significant data exposure.

Deep Dive & Mechanics

The core issue is that Ansible, when handling cookies (likely for session management or authentication), does not enforce the use of security flags. Specifically:

  • Missing Secure flag: The cookie is transmitted over unencrypted HTTP connections, making it susceptible to interception via network sniffing (MitM).
  • Missing HttpOnly flag: The cookie can be accessed by client-side JavaScript, enabling XSS attacks to steal the cookie.
  • Missing SameSite flag: The cookie may be sent in cross-site requests, increasing the risk of CSRF-like attacks.

The vulnerability is triggered when Ansible is configured to use HTTP (non-TLS) for communication, or when a reverse proxy or load balancer terminates TLS but forwards traffic to Ansible over HTTP. An attacker on the same network segment can capture the cookie using tools like Wireshark or tcpdump. If the cookie contains session tokens or API keys, the attacker can impersonate the user or service.

Vulnerable vs. Patched Code

Since no patch is available, the vulnerable code is any Ansible configuration that does not explicitly set cookie security flags. A typical vulnerable configuration might look like:

# Vulnerable: No security flags set
response.set_cookie('session_id', session_token)

A patched or secure version would enforce flags:

# Patched: Secure flags set
response.set_cookie('session_id', session_token, secure=True, httponly=True, samesite='Lax')

In Ansible, this might be in custom modules or plugins that handle HTTP responses. The fix requires developers to add these flags when creating cookies.

Exploitation & Lab Setup

Red Team (Attacker)

Objective: Intercept and steal session cookies from an Ansible web interface or API.

Lab Setup:

  1. Deploy a vulnerable Ansible instance (e.g., Ansible Tower or AWX) with HTTP enabled.
  2. Set up a network sniffer on the same subnet (e.g., using tcpdump or Wireshark).
  3. Use a tool like mitmproxy to perform a Man-in-the-Middle attack if needed.

Exploitation Steps:

  1. Start packet capture: sudo tcpdump -i eth0 -w capture.pcap
  2. Trigger a login or session creation on the Ansible web interface.
  3. Analyze the capture for cookies: tshark -r capture.pcap -Y "http.cookie" -T fields -e http.cookie
  4. Extract the session cookie and use it to impersonate the user: curl -b "session_id=stolen_cookie" http://target-ansible/api/v2/

Note: No exploit code is available from Exploit-DB.

Blue Team (Defender)

Objective: Detect and prevent cookie theft.

Detection Steps:

  1. Monitor network traffic for unencrypted HTTP sessions containing cookies.
  2. Use Wireshark filters: http.cookie and !tls
  3. Implement HSTS (HTTP Strict Transport Security) to force HTTPS.
  4. Configure Ansible to use HTTPS and set cookie flags in configuration files.

Mitigation Commands:

  • In Ansible Tower/AWX, ensure nginx or the web server enforces HTTPS and sets Secure flag.
  • Add to Ansible configuration: cookie_secure = true (if supported).

Indicators of Compromise (IOCs)

  • Network: Unencrypted HTTP traffic containing Set-Cookie headers without Secure or HttpOnly flags.
  • Logs: Access logs showing repeated use of the same session ID from different IP addresses.
  • File: Packet capture files (.pcap) containing plaintext cookies.
  • Behavior: Anomalous API calls using stolen session tokens.

Detection Engineering

YARA Rule

rule Ansible_Insecure_Cookie {
    meta:
        description = "Detects insecure cookies in Ansible HTTP responses"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-53861"
    strings:
        $cookie_header = "Set-Cookie:" nocase
        $secure_flag = "Secure" nocase
        $httponly_flag = "HttpOnly" nocase
    condition:
        $cookie_header and not ($secure_flag or $httponly_flag)
}

Sigma Rule

title: Ansible Insecure Cookie Transmission
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP responses from Ansible that set cookies without security flags
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        http.response.header|contains: 'Set-Cookie:'
        http.response.header|not_contains|all:
            - 'Secure'
            - 'HttpOnly'
    condition: selection
falsepositives:
    - Legitimate applications that do not require security flags (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-53861 - Ansible Insecure Cookie Detected"; flow:to_client; content:"Set-Cookie:"; nocase; pcre:"/Set-Cookie:\s[^;]+(?!.*\bSecure\b)(?!.*\bHttpOnly\b)/si"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Actions:

    • Enforce HTTPS for all Ansible web interfaces and APIs.
    • Configure the web server (e.g., Nginx, Apache) to add Secure, HttpOnly, and SameSite flags to cookies.
    • Example Nginx configuration:
      proxy_cookie_path / "/; Secure; HttpOnly; SameSite=Lax";
      
  2. Long-term Fix:

    • Update Ansible to a patched version once available.
    • Review custom Ansible modules for cookie handling and add security flags.
    • Implement HSTS headers: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
  3. Monitoring:

    • Deploy the provided YARA, Sigma, and Suricata rules to detect insecure cookies.
    • Regularly audit network traffic for unencrypted sessions.
  4. User Awareness:

    • Train administrators to avoid using HTTP for sensitive communications.
    • Use secrets management tools (e.g., Ansible Vault) to protect sensitive data.

Valters IT
Securing DevOps, One CVE at a Time.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-53861/ · 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.