cbcvebase.
CVE-2025-51591
published 2025-07-11

CVE-2025-51591: A Server-Side Request Forgery (SSRF) in JGM Pandoc v3.6.4 allows attackers to gain access to and compromise the whole infrastructure via injecting a crafted…

PriorityP276low3.7CVSS 3.1
AVNACHPRNUINSUCLINAN
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
0.63%
45.7th percentile
A Server-Side Request Forgery (SSRF) in JGM Pandoc v3.6.4 allows attackers to gain access to and compromise the whole infrastructure via injecting a crafted iframe. Note: Some users have stated that Pandoc by default can retrieve and parse untrusted HTML content which can enable SSRF vulnerabilities. Using the ‘--sandbox’ option or ‘pandoc-server’ can mitigate such vulnerabilities. Using pandoc with an external ‘--pdf-engine’ can also enable SSRF vulnerabilities, such as CVE-2022-35583 in wkhtmltopdf.

Affected

1 ranges
VendorProductVersion rangeFixed in
debianpandoc

Detection & IOCsextracted from sources · hover to see the quote

urlhttp://169.254.169.254/latest/meta-data/iam/info
urlhttp://169.254.169.254/latest/meta-data/iam
ip169.254.169.254
path/latest/meta-data/iam/info
path/latest/meta-data/iam/security-credentials/
processpandoc
  • Detect pandoc process making outbound HTTP requests to the IMDS link-local address (169.254.169.254), particularly to IAM credential paths — this is anomalous and indicative of SSRF exploitation via crafted iframe injection.
  • Hunt for HTML input documents submitted to pandoc containing <iframe> or <img> src attributes pointing to 169.254.169.254 or other internal/private IP ranges — this is the attacker's delivery mechanism for the SSRF.
  • Flag pandoc invocations that lack the '--sandbox' flag or 'raw_html' flag when processing untrusted HTML input, as these are the recommended mitigations against this SSRF vector.
  • Monitor for pandoc accessing sensitive IMDS paths such as /latest/meta-data/iam/info and /latest/meta-data/iam/security-credentials/ — these are high-value attacker targets for credential harvesting.
  • Enforce IMDSv2 on all EC2 instances to neutralize iframe-based SSRF attempts from pandoc; IMDSv1 environments are at high risk of credential compromise from this attack pattern.
  • ·IMDSv1 environments are fully exploitable by this attack; IMDSv2 enforcement blocks the stateless GET requests made by iframe src attributes, effectively mitigating cloud credential theft via this vector.
  • ·Even with IMDSv2 blocking cloud credential access, the attacker can still reach other internal servers via the SSRF — the blast radius is not fully contained by IMDSv2 alone.

CVSS provenance

nvdv3.13.7LOWCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
osv9.8CRITICAL
vulncheck9.8CRITICAL
vendor_debian9.8LOW
vendor_redhat9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.