Content Spoofing Vulnerability in Shibboleth Service Provider
The default Shibboleth Service Provider error templates allowed URL parameters to control page resources such as stylesheets and images, enabling content spoofing. An attacker could craft a link that made a trusted login page display misleading content, potentially capturing credentials through phishing.
Published on medium.com
Cybersecurity
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.
Context
Shibboleth is described in the report as one of the most widely used identity management systems in the world. The target of the finding was a web application login page that was using the Shibboleth Service Provider (SP). The SP renders a set of pages under the Shibboleth.sso path, including error and status pages built from templates shipped with the default installation package.
The report names four URL parameters used by these pages: logoLocation, stylesheet, statusCode and supportContact. The report explains that the default templates populate these values from URL parameters, which is the behaviour at the centre of the vulnerability.

Setup
This was found during a web application security assignment against a login page that used the Shibboleth SP. No specific accounts, roles or tooling are described. The important precondition is that the service provider uses the default error templates from the installation package: the report states that all Shibboleth integrations were vulnerable by default when default error templates were used, and that the issue had been present since around 2007.
Finding it
The login page had a content spoofing vulnerability: the application allowed loading and rendering arbitrary stylesheet and image resources from URL parameter values. The report notes this is a common finding in a typical web application security assessment.
What made this case different was the next step. A closer look showed that this was not a client specific implementation issue but a vulnerability in the default installation package of the Shibboleth SP product itself. The vulnerable template files contain the shibmlp template tag, which is populated from URL parameters that an attacker can manipulate.
Exploitation
The report states that attacking the vulnerability was straightforward once discovered, and demonstrates it in two screenshots.
Step 1: trigger the error page
The victim site raises a ConfigurationException about the value of a wrong target address. This gets the victim onto a Shibboleth SP error page whose content is built from the vulnerable template.

Step 2: replace the visible page
The original error message is hidden by a customised stylesheet, and the whole visible page is loaded from an attacker-controlled location. The victim sees the spoofed content under the context of the trusted domain.

The report does not include the exact URL, parameter values or payloads used in the screenshots. The parameters involved are named in the details section: logoLocation, stylesheet, statusCode and supportContact. Implementation of various Shibboleth.sso pages is vulnerable because these URL parameters can be used to rewrite page resources.
Root cause
The default installation package contains vulnerable templates that refer to those parameters, and the shibmlp template tag is populated from URL parameters that an attacker can manipulate. Because the values come from the request rather than from server-side configuration, an attacker controls the resources the page loads and the content it displays.
The default templates themselves were the problem, so integrations using them were vulnerable by default.
Impact
If the victim follows a link crafted by an attacker, the modified page is presented to the user under the context of the trusted domain. The report describes this as typically usable as, or in conjunction with, social engineering, because the attack exploits a code-based vulnerability and the user's trust.
The attacker could send the misleading content spoofing URL via Twitter, Facebook, Instagram or other similar popular channels, or feed the link into search engines. As an example, a crafted payload could say that there is something wrong with the login and that the service hosted by the attacker should be used instead. The attacker could then capture the login credentials of victims who follow the page's spoofed instructions.
Because the SP is widely used, there are many vulnerable services in production. The report says many popular Finnish HAKA federation partners were confirmed vulnerable, including Aalto University, University of Helsinki and Metropolia university of applied sciences, and that outside Finland the issue affected for example Harvard University. HAKA is the identity federation of Finnish universities, polytechnics and research institutions, operated by CSC, with 30 million logins each year for 300 partner services. An attacker could have leveraged the vulnerability for phishing and other attacks by presenting content as if it originated from a trusted service.
Fix
Update Shibboleth SP to V3.2.1 or later. That version no longer populates the template variable from URL parameters by default.
The report also gives the disclosure timeline:
| Date | Event |
|---|---|
| 2021-03-04 | Vulnerability discovered by Toni Huttunen, Fraktal |
| 2021-03-05 | PoC made |
| 2021-03-09 | Reported to CERT-FI |
| 2021-03-15 | Reported to Funet CERT |
| 2021-03-15 | Funet CERT responds that the issue is relayed to HAKA organisations |
| 2021-03-16 | Helsinki patches their public shibboleth-service-provider-template |
| 2021-03-16 | Shibboleth Jira ticket SSPCPP-922 issued |
| 2021-03-16 | Shibboleth advisory published |
| 2021-03-16 | HY alerts internal parties |
| 2021-03-16 | HAKA alerts internal parties about the advisory |
| 2021-03-18 | CERT-FI confirms receipt of the report |
| 2021-03-18 | Debian security announcement |
| 2021-03-22 | CVE-2021-28963 published |
| 2021-05-24 | Write-up published |
Variants to test
- Request the
Shibboleth.ssoerror and status pages withlogoLocation,stylesheet,statusCodeandsupportContactset to values you control.
What happened, in plain words
A security researcher was testing a website's login page during a web application security assignment. While poking at it, he found something that looked like a small, common problem: the page would happily load a stylesheet or an image from any address you put in the link. That kind of bug is called content spoofing, and on its own it is the sort of thing testers see all the time.
But when he looked closer, the problem was not in that one website. It was in a piece of software the website was using, called Shibboleth Service Provider. That software ships with a set of ready-made pages, including error pages, and those pages take some of their content from the web address the visitor arrived on. Anyone who can send a link can therefore decide what those pages show. Because the software is widely used and the faulty pages were the default ones, integrations using the default error templates were affected, going back to around 2007.
This article walks through what the researcher found, why it matters, how the attack works, and what to do about it, in the same order as the original write-up, but explained from scratch.

The image above is the banner of the article, introducing Shibboleth as one of the most widely used identity management systems in the world and the vulnerability that Fraktal's Toni Huttunen discovered in it.
Some words you will need
Before the details, a few everyday ideas. You do not need to memorise them; each one is explained again where it first matters.
- A web server is the computer that holds a website and sends pages to your browser when you ask for them.
- A URL is the address you type or click, for example
https://example.com/login. The part after the?is called the query string, and it carries small pieces of information called parameters, such as?colour=blue. The server reads those values and can use them to build the page. - A stylesheet is a file that tells the browser how a page should look: fonts, colours, where things sit. A page can point to a stylesheet stored somewhere else on the internet.
- Content spoofing means making a genuine page show content that the real owner did not intend, so that the visitor is fooled while the address bar still shows the trusted site.
- Phishing is tricking someone into handing over a password or other secret by pretending to be a service they trust.
- An identity management system is software that handles who can log in to what. Instead of every website keeping its own usernames and passwords, one central system checks your identity and tells the websites "this person is who they say they are". Shibboleth is one of the most widely used such systems in the world.
- A Service Provider (SP) is the Shibboleth component that sits on the website you are trying to reach. It talks to the central login system and then lets you in. It also produces a handful of its own pages, such as error and status pages, under a path called
Shibboleth.sso. - A template is a page with blanks in it. The software fills the blanks with values (a logo address, a stylesheet address, a status code, a support contact) before sending the page to your browser. Shibboleth ships with default templates, and those defaults are the heart of this story.
- A template tag is the marker inside a template that says "put a value here". In Shibboleth's templates the marker is called
shibmlp. - A CVE is a public catalogue number given to a known security flaw so that everyone can refer to the same issue. This one is CVE-2021-28963.
Overview: what was found
During a web application security assignment, the researcher found that the application's login page had a content spoofing vulnerability. The application allowed loading and rendering arbitrary stylesheet and image resources from the URL parameter values. In plain terms: if you put an address into a certain part of the link, the page would fetch a stylesheet or an image from that address and display it. The report notes that this is a common finding in a typical web application security assessment.
Why does that matter? Because the page is still served from the trusted domain. If a victim follows a link crafted by an attacker, the modified page is presented to the user under the context of the trusted domain. The address bar says the real site; the content says whatever the attacker chose. This sort of attack could typically be used as, or in conjunction with, social engineering, because the attack exploits a code-based vulnerability and the user's trust. Social engineering means manipulating a person rather than a machine: you convince them to do something, instead of breaking in technically.
The attacker could send this misleading content spoofing URL via Twitter, Facebook, Instagram or other similar popular channel, or by feeding the link into search engines. As an example, a crafted payload could say that there is something wrong with the login and the service hosted by the attacker should be used instead. The attacker could then capture the login credentials of the victims that are following page's spoofed instructions. In other words, the victim sees a message on the genuine site telling them to log in somewhere else, and hands their password to the attacker.
The target application login was utilising Shibboleth Service Provider (SP). A closer look revealed that this was not a client specific implementation issue but a vulnerability in the default installation package of the Shibboleth SP product. That distinction is the important one. A "client specific implementation issue" would mean one organisation configured its site badly. A flaw in the default installation package means the problem arrives with the software itself, out of the box, for everyone. In other words, all Shibboleth integrations were vulnerable by default when default error templates were used. Shibboleth is one of the most widely used identity management systems in the world, and thus it was surprising to find out that the issue has been around from year 2007.
Impact: who was affected
The Shibboleth SP is widely used, which means that there are a lot of vulnerable services in production. "In production" simply means real, live systems that people use every day, as opposed to test systems.
As an example, the researcher confirmed that many popular Finnish HAKA federation partners were vulnerable, including organisations like Aalto University, University of Helsinki and Metropolia university of applied sciences. Outside Finland the issue affected for example Harvard University.
HAKA is the identity federation of the Finnish universities, polytechnics, and research institutions. A federation here means a group of organisations that agree to trust one shared login system. Users can access federation services using a single user account and password provided by the users' home organisations. So a student at one university can log in to services at another without a separate account. HAKA federation is operated by CSC, IT Center for Science Ltd. HAKA identity federation has 30 million logins each year for their 300 partner services. Those numbers give a sense of scale: a flaw in the shared login pages touches a very large number of people.
An attacker could have leveraged the vulnerability for phishing and other attacks, by being able to present content as if it appeared to originate from a trusted service. The key phrase is "as if it appeared to originate from a trusted service": the victim has no easy way to tell the page is not genuine, because the address is genuine.
Details: what exactly was wrong
Implementation of various Shibboleth.sso pages are vulnerable by allowing rewriting page resources by using URL parameters logoLocation, stylesheet, statusCode and supportContact. The default installation package contains vulnerable templates that are referring to those parameters and thus is vulnerable.
Let us unpack that. The Shibboleth SP publishes several pages under the path Shibboleth.sso, including error and status pages. Those pages are built from templates. The report names four URL parameters involved:
| Parameter | What it controls on the page |
|---|---|
logoLocation |
The address of the logo image shown on the page |
stylesheet |
The address of the stylesheet that decides how the page looks |
statusCode |
The status code shown on the page |
supportContact |
The support contact shown on the page |
The shibmlp template tag is populated from URL parameters that an attacker can manipulate. Whoever writes the link decides the values. That is the whole vulnerability in one sentence.
Vulnerable template files were present in multiple template files. They contain shibmlp template tag that is populated from URL parameters that an attacker can manipulate. The report includes examples of vulnerable code in the Shibboleth templates.
Exploitation: how the attack looked in practice
Once discovered, attacking the vulnerability was pretty straightforward, as demonstrated in the screenshots. The report does not give the exact URL, parameter values or payloads used in those screenshots; it shows the two steps and the result.
Step 1: get the victim onto the error page
The victim site raises a ConfigurationException about the value of wrong target address. A ConfigurationException is simply an error message saying that something in the configuration is wrong. The victim site raises a ConfigurationException about the value of the wrong target address. That error page is the one built from the vulnerable template, so it is the page the attacker wants the victim to see.

The screenshot shows Step 1: the victim site raises a ConfigurationException about the value of the wrong target address.
Why start here? Because the attacker needs a page that is generated by the vulnerable template. The error page is exactly that, and it can be reached by a crafted link.
Step 2: replace what the victim sees
The original error message is hidden by a customised stylesheet, and the whole visible page is loaded from an attacker-controlled location. The victim sees the spoofed content under the context of the trusted domain.

The screenshot shows Step 2: the original error message is hidden by a customised stylesheet and the whole visible page is loaded from an attacker-controlled location.
Why does a stylesheet achieve this? Because a stylesheet controls what is visible and where. It can hide elements of the page and place other content over them. The browser shows all of this while the address bar still shows the trusted site, which is precisely the deception described in the impact section.
Root cause: why it happened
The default installation package contains vulnerable templates that refer to those parameters, and the shibmlp template tag is populated from URL parameters that an attacker can manipulate. Because the values come from the request rather than from server-side configuration, an attacker controls the resources the page loads and the content it displays.
The report does not describe any defence that was in place and failed; the point is that the default templates themselves were the problem, so every integration using them was vulnerable by default. This is why the finding was surprising: it was not one organisation's mistake, it was the shipped default.
Mitigation: the fix
Update Shibboleth SP to V3.2.1 or later. This version will no longer populate the template variable from URL parameters by default. After the update, the template variable is no longer populated from URL parameters by default.
Timeline: how the disclosure went
As a company, the researcher's employer is committed to responsible disclosure and will not release vulnerabilities they have discovered before vendors and users have had a chance to remedy. Responsible disclosure means telling the maker first, giving them time to fix it, and only then telling the public. In this case the timeline was as follows.
| Date | Event |
|---|---|
| 2021-03-04 | Shibboleth SP vulnerability was discovered by Toni Huttunen, Fraktal |
| 2021-03-05 | PoC was made |
| 2021-03-09 | Reported issue to CERT-FI |
| 2021-03-15 | Reported issue to Funet CERT |
| 2021-03-15 | Funet CERT responded that the issue is relayed to HAKA organisations |
| 2021-03-16 | Helsinki patched their public shibboleth-service-provider-template |
| 2021-03-16 | Shibboleth Jira ticket issued |
| 2021-03-16 | Shibboleth advisory published |
| 2021-03-16 | HY alerted their internal parties about the issue |
| 2021-03-16 | HAKA alerted their internal parties about the published Shibboleth advisory |
| 2021-03-18 | CERT-FI confirms that they have received the vulnerability report |
| 2021-03-18 | Debian security announce |
| 2021-03-22 | CVE-2021-28963 published |
| 2021-05-24 | This write up published |
A few of those entries deserve a word. A PoC, or proof of concept, is a small demonstration that the flaw is real, usually the shortest possible example that makes it happen. CERT-FI is the Finnish national computer security incident response team; a CERT in general is a team you report security incidents to. Funet CERT is the corresponding team for the Finnish university network. A Jira ticket is an entry in the issue tracker the Shibboleth project uses to record and track bugs. An advisory is the official public notice from the software's maintainers describing the flaw and the fix. Debian is a popular Linux distribution, and its security announcement tells its users to update. The CVE entry is the permanent public record of the flaw.
Variants to test: how to check other systems
If you look after a website, or you are learning to test one, here is how the same idea can be checked elsewhere.
- Request the
Shibboleth.ssoerror and status pages withlogoLocation,stylesheet,statusCodeandsupportContactset to values you control. A positive result is a page that loads your stylesheet or image, or shows your text, while still being served from the target domain. In other words: if you can make the page show something of yours, the flaw is present. - Check whether the deployment uses the default templates or a customised set. A positive result is a template that still contains the
shibmlptag populated from request parameters. - Check the SP version. A positive result is a version older than 3.2.1, where the template variable is populated from URL parameters by default.
- Try the same parameter-driven resource loading on other products that render error or status pages from templates, looking for stylesheet or image URLs taken from the request. A positive result is arbitrary resource loading under the trusted origin.
Glossary
- Advisory: an official public notice from a software's maintainers describing a security flaw and its fix.
- Browser: the program you use to view websites, such as Firefox or Chrome.
- CERT: a computer security incident response team; a national or organisational team that receives and coordinates reports of security problems.
- CERT-FI: the Finnish national computer security incident response team.
- ConfigurationException: an error message saying that something in a system's configuration is wrong.
- Content spoofing: making a genuine page display content its owner did not intend, so visitors are misled while the address bar shows the trusted site.
- CVE: a public catalogue number for a known security flaw, so everyone can refer to the same issue.
- Debian: a popular Linux distribution.
- Federation: a group of organisations that agree to trust one shared login system.
- Funet CERT: the computer security incident response team for the Finnish university network.
- HAKA: the identity federation of Finnish universities, polytechnics and research institutions, operated by CSC.
- Identity management system: software that handles who can log in to what, often centrally for many websites.
- Jira ticket: an entry in an issue tracker used to record and follow a bug.
- Parameter: a named value carried in a URL's query string, such as
colour=bluein?colour=blue. - Phishing: tricking someone into giving away a password or other secret by pretending to be a service they trust.
- PoC (proof of concept): a small demonstration that a flaw is real.
- Production: real, live systems that people use, as opposed to test systems.
- Query string: the part of a URL after the
?, carrying parameters. - Responsible disclosure: telling the maker of software about a flaw first, giving time to fix it, and only then telling the public.
- Service Provider (SP): the Shibboleth component on the website you are trying to reach; it talks to the central login system and produces pages under
Shibboleth.sso. - Shibboleth: an identity management system, described in the report as one of the most widely used in the world.
shibmlp: the template tag in Shibboleth's templates that marks where a value is inserted.- Social engineering: manipulating a person rather than a machine, for example by convincing them to follow instructions.
- Stylesheet: a file that tells the browser how a page should look, including what is visible and where.
- Template: a page with blanks that the software fills with values before sending it to the browser.
- Template tag: the marker inside a template that says where a value goes.
- URL: the address of a page or resource on the web.
- Web server: the computer that holds a website and sends its pages to your browser.