Where
-Infinity
0
Severity
6.3
XEE, SSRF
AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Summary

XML External Entity (XXE) vulnerability in esaml (and its forks) allows an attacker to cause the system to read local files and incorporate their contents into processed SAML documents, and potentially perform SSRF via crafted SAML messages.

esaml parses attacker-controlled SAML messages using xmerlscan:string/2 before signature verification without disabling XML entity expansion. On Erlang/OTP versions before 27, Xmerl allows entities by default, enabling pre-signature XXE attacks. An attacker can cause the host to read local files (e.g., Kubernetes-mounted secrets) into the SAML document. If the attacker is not a trusted SAML SP, signature verification will fail and the document is discarded, but file contents may still be exposed through logs or error messages.

This issue affects all versions of esaml, including forks by arekinath, handnot2, and dropbox. Users running on Erlang/OTP 27 or later are not affected due to Xmerl defaulting to entities disabled.

This issue affects esaml: all versions.

Workarounds

Upgrade to Erlang/OTP 27 or later. Starting with OTP 27, xmerlscan disables entity expansion by default, which mitigates this vulnerability without changes to esaml.

Configurations

The application must use esaml to process SAML messages and run on Erlang/OTP versions before 27. Starting with OTP 27, xmerlscan disables entity expansion by default, which mitigates this vulnerability.

1 / 2
Source: OSV
First published (updated )
Severity
8.7
AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Summary

Improper Handling of Highly Compressed Data (Data Amplification) in esamlbinding in dropbox esaml allows an unauthenticated attacker to exhaust server memory and crash the Erlang VM via a crafted compressed SAMLResponse.

esamlbinding:decoderesponse/2 base64-decodes the attacker-supplied SAMLResponse, inflates it with zlib:unzip/1 with no bound on the output, then converts the result to a charlist with binarytolist/1 before parsing. This runs on the SAML consume (ACS) and single-logout endpoints, which accept unauthenticated requests by design, and it runs before any signature check. A small deflate stream reaches a compression ratio near 1000 to 1, so a request body of tens of kilobytes inflates to hundreds of megabytes and then to several gigabytes of list heap, so a few requests exhaust memory and take the node down.

This issue affects esaml: from 0.1.0 onward.

Details

1. Input. The SAML consume (ACS) and single-logout endpoints read the request body and pass the SAMLResponse form field to esamlbinding:decoderesponse/2. The attacker's SAMLEncoding field selects the clause. Both clauses inflate: the explicit DEFLATE clause, and the default clause, which tries zlib:unzip/1 inside a catch whenever the body is not plain XML.

2. Unbounded inflate. decoderesponse/2 evaluates binarytolist(zlib:unzip(base64:decode(SAMLResponse))). zlib:unzip/1 inflates the whole stream in one call with no cap on output size, and binarytolist/1 then expands the inflated binary to a charlist, which costs about 16 bytes of heap per byte on a 64-bit VM.

3. Exhaustion before any check. All of this happens before xmerlscan parses the document and before esamlsp verifies any signature. A deflate stream of a long run of identical bytes reaches a ratio near 1000 to 1, so a request body of tens of kilobytes produces hundreds of megabytes of binary and then several gigabytes of list heap. A few concurrent requests exhaust memory and crash the node.

Proof of concept

1. Build a SAMLResponse as the base64 of a raw deflate stream of a long run of identical bytes (for example 60 MB of zero bytes), which encodes to roughly 79 KB on the wire. 2. Post it to the service provider's SAML consume (ACS) endpoint as the SAMLResponse form field, with SAMLEncoding set to the DEFLATE URI, or omitted to take the default clause. 3. esamlbinding:decoderesponse/2 inflates the stream and converts it to a charlist before any signature check. A single request spikes the Erlang VM by several gigabytes. Repeat to exhaust memory and crash the node.

Impact

An unauthenticated attacker reaches a SAML consume or single-logout endpoint and posts a small compressed SAMLResponse that inflates to gigabytes, exhausting memory. A few requests crash the Erlang VM and deny service to every user of the service provider.

1 / 2
Source: OSV
First published (updated )
Severity
8.2
AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Summary

Allocation of Resources Without Limits or Throttling vulnerability in esaml in dropbox esaml allows an unauthenticated attacker to exhaust the Erlang VM atom table and crash the node via unsigned LogoutResponse messages.

esaml:statuscodemap/1 in src/esaml.erl maps any StatusCode value it does not recognize to an atom with listtoatom/1 on the last colon-separated segment of the URN. esamlsp:validatelogoutresponse/2 verifies a signature only when the message carries one, so an unsigned LogoutResponse posted to the single-logout endpoint reaches esaml:decodelogoutresponse/1 and mints one permanent atom per distinct status value. Atoms are never reclaimed and the VM caps the atom table at about one million entries, so an attacker who posts that many distinct values aborts the node.

This issue affects esaml: from 0.1.0 onward.

Details

1. Input. The single-logout endpoint in esamlcowboy:validatelogout/2 reads the request body, decodes the SAMLResponse form field with esamlbinding:decoderesponse/2, and passes a samlp:LogoutResponse document to esamlsp:validatelogoutresponse/2.

2. No signature required. validatelogoutresponse/2 looks for a ds:Signature element and verifies it only when one is present. An unsigned document passes through unchanged to esaml:decodelogoutresponse/1, which requires only the Version and IssueInstant attributes before mapping the StatusCode value.

3. Interning. esaml:statuscodemap/1 matches six known SAML status URNs to fixed atoms. Any other value starting with urn: falls through to a clause that interns the last colon-separated segment with listtoatom/1. The attacker chooses that segment, so each request with a fresh value mints one permanent atom. The VM aborts when the atom table reaches its limit of about one million entries.

Proof of concept

1. Build an unsigned samlp:LogoutResponse document with Version="2.0", any IssueInstant, and a samlp:Status/samlp:StatusCode whose Value is a fresh URN such as urn:x:<unique token>. 2. Deflate and base64-encode it, and post it to the service provider's single-logout endpoint as the SAMLResponse form field with SAMLEncoding set to the DEFLATE URI. 3. esamlsp:validatelogoutresponse/2 skips signature verification because none is present, esaml:decodelogoutresponse/1 maps the status through statuscodemap/1, and the atom table grows by one entry per distinct token. The endpoint answers with an error, but the atom is never reclaimed. Repeat with fresh tokens until the VM aborts.

Impact

An unauthenticated attacker posts unsigned LogoutResponse messages with distinct status code URNs to a service provider's single-logout endpoint. Each message permanently consumes one atom table entry, and about one million of them abort the Erlang VM, denying service to every user of the service provider.

Configurations

Reachable only where the service provider exposes a single-logout endpoint that hands incoming LogoutResponse messages to esamlsp:validatelogoutresponse/2, directly or through esamlcowboy:validatelogout/2. The consume (ACS) path verifies signatures before decoding and does not reach the status code mapping.

1 / 2
Source: OSV
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203