Pandoc CVE-2025-51591 Exploited to Target AWS IMDS Credentials

Active Exploitation of Pandoc Vulnerability Targets AWS Metadata Service via SSRF Attacks, Mitigated by IMDSv2 and Input Sanitization

  • Security researchers discovered active attempts to exploit a vulnerability in the Linux utility Pandoc to target Amazon Web Services (AWS) Instance Metadata Service (IMDS).
  • The flaw, tracked as CVE-2025-51591, is a Server-Side Request Forgery (SSRF) with a CVSS score of 6.5, enabling attackers to use crafted HTML iframe elements to attack.
  • AWS IMDS provides temporary credentials for applications on EC2 instances, making it a valuable target for credential theft through SSRF attacks.
  • The attack attempts were unsuccessful due to the use of newer IMDSv2, which requires extra authentication steps that prevent simple SSRF-driven credential theft.
  • Experts recommend using IMDSv2, input sanitization, and principle of least privilege to reduce risk and impact of such vulnerabilities.

Cloud security firm Wiz reported in-the-wild exploitation attempts against a vulnerability in the Linux utility Pandoc, aiming to breach the Amazon Web Services (AWS) Instance Metadata Service (IMDS). These incidents began in August and lasted for several weeks, seeking to steal temporary credentials in AWS cloud environments.

- Advertisement -

The exploited vulnerability, CVE-2025-51591, allows attackers to use specially crafted HTML iframe tags to launch Server-Side Request Forgery (SSRF) attacks. According to Wiz, if successful, the flaw could allow intruders to gain access to sensitive instance metadata or temporary credentials used to interact with core AWS services.

Researchers Hila Ramati and Gili Tikochinski at Wiz explained, “If the application can reach the IMDS endpoint and is susceptible to SSRF, the attacker can harvest temporary credentials without needing any direct host access (such as RCE or path traversal).” They added that the attacks focused on injecting malicious iframes into Pandoc documents to collect data from IMDS endpoints such as /latest/meta-data/iam/info.

Past incidents show SSRF vulnerabilities can pose real threats. In early 2022, Mandiant, part of Google, reported attackers exploited SSRF flaws—including CVE-2021-21311 in the Adminer tool—to steal credentials from AWS instances using IMDS.

IMDS, specifically its older version IMDSv1, operates through a simple request-and-response model, making it an attractive target for SSRF attacks. However, the latest attack attempts failed because IMDSv2 was enabled. IMDSv2 uses session tokens and specific headers, requiring multiple authentication steps that block unauthorized access through basic SSRF techniques.

- Advertisement -

Security experts recommend addressing CVE-2025-51591 by using sanitization options in Pandoc, such as the “-f html+raw_html” or “–Sandbox” switch, which prevent loading potentially dangerous iframes. Wiz noted, “[Pandoc maintainers] decided that rendering iframes is the intended behavior and that the user is responsible to either sanitize the input or use the sandbox flags when handling user inputs.”

Further protection includes enforcing IMDSv2 across all AWS EC2 instances and assigning instance roles with only the minimum permissions required. These measures help contain risks if attackers successfully exploit SSRF flaws in third-party software running on cloud infrastructure.

Additional findings indicate threat actors have also targeted similar SSRF bugs in other cloud applications, such as ClickHouse, though security measures prevented successful breaches.

✅ Follow BITNEWSBOT on Telegram, Facebook, LinkedIn, X.com, and Google News for instant updates.

Previous Articles:

- Advertisement -

Latest News

Gate Launches Ethereum-Compatible Layer 2, Revamps GT Token

Gate has introduced Gate Layer, a new Layer 2 blockchain to raise transaction speeds...

FalconX Launches First Forward Rate Contracts for Ethereum Staking

FalconX completed the first forward rate agreements based on the Treehouse Ethereum Staking Rate. The...

Oracle to Operate TikTok US Algorithm as Takeover Deal Nears Completion

A potential agreement is nearing that would move control of TikTok’s U.S. operations to...

Bitcoin Options Expiry Favors Bulls if $112K Holds Amid Uncertainty

About $22.6 billion in Bitcoin options contracts are set to expire on Friday, with...

BitMine Buys $84M in Ethereum, Analysts See ETH Hitting $12K+

Ethereum holds above $4,100 following an $84 million purchase by BitMine Immersion.The company now...
- Advertisement -

Must Read

Top 8 Books Every Beginner Should Read About Cryptocurrency

Cryptocurrency and blockchain technology are filled with technical terms that beginners find challenging to understand. One of the best ways to learn about cryptocurrency...