03:00 PM
Connect Directly

SAML Flaw Lets Hackers Assume Users' Identities

Vulnerability affects single sign-on for SAML-reliant services including OneLogin, Duo Security, Clever, and OmniAuth.

A newly discovered vulnerability lets attackers take advantage of single sign-on (SSO) systems relying on Security Assertion Markup Language (SAML) and authenticate as another user without knowing his or her password.

Duo Security's Duo Labs discovered the flaw and coordinated with the CERT/CC on disclosures from the affected vendors, which include Duo Security. The CERT/CC published an advisory on the flaw today.

SAML is an XML markup language used to authenticate to third-party applications. When a user authenticates to an application such as Office 365 or Salesforce, SAML redirects the browser to a company login page. After a successful login, the browser redirects to the third-party app and grants the user access. SAML is popular among SSO services.

Step one of SSO authentication is via the Identity Provider (IdP), which checks usernames and passwords, verifies account status, and prompts two-factor authentication. The IdP generates a signed SAML response, which it forwards to the service provider for validation. If the signature is valid, a string identifier in the SAML response identifies which user to authenticate.

Researchers at Duo Labs discovered many open-source libraries incorrectly use the results of XML DOM traversal and canonicalization APIs. An attacker can change SAML responses without altering the cryptographic signature and authenticate to applications as a legitimate user.

"Single sign-on simplifies authentication by letting you log into one service which, in turn, grants access to multiple services," explains Kelby Ludwig, senior application security engineer at Duo. "If an attacker has access to one of the single sign-on systems, they can tamper with SAML in such a way they can log in as different users."

The vulnerability is in the XML comments inserted into SAML response requests. In most cases, the XML canonicalization algorithm will remove comments while validating the signature. This means any attacker can add comments to a SAML response without invalidating the signature.

All an attacker needs is an account on the same network as the target. They can change the content of their own SAML requests so a different user's name appears as their own and bypass the primary authentication for the affected SAML provider.

Duo Labs identified the following affected vendors. CVEs have been assigned for:

  • OneLogin - python-saml - CVE-2017-11427
  • OneLogin - ruby-saml - CVE-2017-11428
  • Clever - saml2-js - CVE-2017-11429
  • OmniAuth-SAML - CVE-2017 - 11430
  • Shibboleth - CVE-2018-0489
  • Duo Network Gateway - CVE-2018-7340

This vulnerability affects each service relying on SAML in different ways. SAML IdPs and service providers are very configurable and there's room for greater or lesser impact. For example, service providers that use email addresses and validate their domain against a whitelist are less likely to be exploited than those allowing arbitrary strings to identify users, researchers explain.

It's important to emphasize this flaw doesn't only affect IdPs but SAML libraries. In the case a vendor wants to add single sign-on, they may add one of these libraries, which would increase the number of people affected. Anyone who uses one of these libraries should check whether they're affected, says Steve Manzuik, director of security research at Duo Labs.

"Enterprises running products will have patches to install and vendors using affected libraries will have to issue patches as well," says Manzuik. Remediation depends on the type of relationship a business has with SAML.

This vulnerability only lets an attacker bypass the first factor of authentication, so it helps if your SAML service provider uses two-factor authentication. However, if your IdP handles both first- and second-factor authentication, the flaw likely bypasses both.

Related Content:




Black Hat Asia returns to Singapore with hands-on technical Trainings, cutting-edge Briefings, Arsenal open-source tool demonstrations, top-tier solutions and service providers in the Business Hall. Click for information on the conference and to register.

Kelly Sheridan is the Staff Editor at Dark Reading, where she focuses on cybersecurity news and analysis. She is a business technology journalist who previously reported for InformationWeek, where she covered Microsoft, and Insurance & Technology, where she covered financial ... View Full Bio

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
User Rank: Apprentice
2/28/2018 | 12:08:15 PM
Does this flaw also allow attackers to assume user identities and login on mobile devices as well?
The Case for Integrating Physical Security & Cybersecurity
Paul Kurtz, CEO & Cofounder, TruSTAR Technology,  3/20/2018
A Look at Cybercrime's Banal Nature
Curtis Franklin Jr., Senior Editor at Dark Reading,  3/20/2018
City of Atlanta Hit with Ransomware Attack
Dark Reading Staff 3/23/2018
Register for Dark Reading Newsletters
White Papers
Current Issue
How to Cope with the IT Security Skills Shortage
Most enterprises don't have all the in-house skills they need to meet the rising threat from online attackers. Here are some tips on ways to beat the shortage.
Flash Poll
[Strategic Security Report] Navigating the Threat Intelligence Maze
[Strategic Security Report] Navigating the Threat Intelligence Maze
Most enterprises are using threat intel services, but many are still figuring out how to use the data they're collecting. In this Dark Reading survey we give you a look at what they're doing today - and where they hope to go.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
Published: 2017-05-09
NScript in mpengine in Microsoft Malware Protection Engine with Engine Version before 1.1.13704.0, as used in Windows Defender and other products, allows remote attackers to execute arbitrary code or cause a denial of service (type confusion and application crash) via crafted JavaScript code within ...

Published: 2017-05-08
unixsocket.c in lxterminal through 0.3.0 insecurely uses /tmp for a socket file, allowing a local user to cause a denial of service (preventing terminal launch), or possibly have other impact (bypassing terminal access control).

Published: 2017-05-08
A privilege escalation vulnerability in Brocade Fibre Channel SAN products running Brocade Fabric OS (FOS) releases earlier than v7.4.1d and v8.0.1b could allow an authenticated attacker to elevate the privileges of user accounts accessing the system via command line interface. With affected version...

Published: 2017-05-08
Improper checks for unusual or exceptional conditions in Brocade NetIron 05.8.00 and later releases up to and including 06.1.00, when the Management Module is continuously scanned on port 22, may allow attackers to cause a denial of service (crash and reload) of the management module.

Published: 2017-05-08
Nextcloud Server before 11.0.3 is vulnerable to an inadequate escaping leading to a XSS vulnerability in the search module. To be exploitable a user has to write or paste malicious content into the search dialogue.