Skip to content
OAuth / SSO Write-up Advanced

Oracle WebLogic - Multiple SAML Vulnerabilities (CVE-2018-2998/CVE-2018-2933)

Two flaws in Oracle WebLogic's SAML service provider allowed authentication bypass: an XML comment inside the NameID tag could make the server process only the text after the comment, and by default the server did not require signed SAML assertions, so an attacker could remove the signature and tamper the assertion to log in as any user.

Denis Andzakovic Follow

Published on pulsesecurity.co.nz

Two vulnerabilities were discovered within the Oracle WebLogic SAML service provider authentication mechanism. By inserting an XML comment into the SAML NameID tag, an attacker can coerce the SAML service provider to log in as another user.

Denis Andzakovic, on pulsesecurity.co.nz

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 SAML parser mishandled XML comments inside the NameID element, and the default configuration did not enforce signature verification on assertions.

Impact

An attacker could bypass authentication and gain access as an arbitrary user, including an administrator, if they could register a suitable account with the identity provider or if assertions were unsigned by default.

What the attacker needed

WebLogic SAML service provider in default config; ability to register a crafted username at the IdP; or ability to submit an unsigned SAML assertion

The fix

Oracle fixed both issues in the July 2018 critical patch update.

How it was found

  1. Register a user with the identity provider whose name contains an XML comment, such as attacker<!---->admin.
  2. Log in to obtain a valid SAML assertion for that user.
  3. Insert an XML comment inside the NameID tag of the assertion without invalidating its signature.
  4. Submit the tampered assertion to the WebLogic service provider, which processes only the text after the comment and logs in as admin.

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.

SAML is a way for websites to trust a separate login service. WebLogic checked the login message incorrectly: it ignored part of the username when an XML comment was present, and it did not always check that the message was signed. An attacker could therefore change the username in the message and log in as someone else, such as an administrator.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by Denis Andzakovic

View all

7 more disclosed reports, best first.

More from Oracle (WebLogic)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.