Skip to content
XXE Write-up Intermediate

SugarCRM <= 6.5.18 (SAML Authentication) XML External Entity Vulnerability

The SAML response handler in SugarCRM decodes a user-supplied POST parameter and loads it as XML without disabling external entity loading. An attacker could submit a crafted SAML response to make the server parse external entities, potentially reading local files or reaching internal resources.

karmainsecurity.com

Published on karmainsecurity.com

The vulnerable code is located in the constructor method of the SamlResponse class:

The author, on karmainsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the XML parser was left with external entity loading enabled because libxml_disable_entity_loader() was never called before parsing untrusted SAML input.

Impact

An attacker could potentially read local files or make the server contact internal systems through crafted XML entities, though the text does not demonstrate a full exploit.

What the attacker needed

Access to the SAML login endpoint; ability to send a crafted SAMLResponse

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When a program reads XML, it can be told to pull in extra content from elsewhere, including files on the server. This report says SugarCRM did not switch off that feature, so a malicious login message could make the server fetch things it should not. That can leak data or let an attacker probe the internal network.

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.