ghsa-mj9p-v2r8-wf8w
Vulnerability from github
Background
SimpleSAMLphp allows users to report errors and failures to the system administrators via a web form. This web form gathers some contextual information automatically, but it also allows the user to provide their email address for follow-ups and a free-text explanation of what happened. Once submitted, the report is sent as an email to the administrative email address configured in the software.
Description
The www/erroreport.php
script allows error reports to be submitted and sent to the system administrator. Starting with SimpleSAMLphp 1.18.0, a new SimpleSAML\Utils\EMail
class was introduced to handle sending emails, implemented as a wrapper of an external dependency.
This new wrapper allows us to use Twig templates in order to create the email sent with an error report. Since Twig provides automatic escaping of variables, manual escaping of the free-text field in www/errorreport.php
was removed to avoid double escaping. However, for those not using the new user interface yet, an email template is hardcoded into the class itself in plain PHP. Since no escaping is provided in this template, it is then possible to inject HTML inside the template by manually crafting the contents of the free-text field.
Affected versions
SimpleSAMLphp versions 1.18.0 to 1.18.3, both inclusive.
Impact
An attacker may take advantage of this issue to manually craft a modified email sent via the error reporting mechanism, such as this email might trick a system administrator into performing an action, such as introducing their credentials into a phishing web site that resembles the original.
Remote execution of javascript code is considered unfeasible since email clients do not run javascript present in emails, although there might be email clients which don't follow this rule, making the attack surface grow.
Resolution
Upgrade the SimpleSAMLphp installation to version 1.18.4.
Credit
This vulnerability was discovered and reported by Frederic Vleminckx.
{ "affected": [ { "package": { "ecosystem": "Packagist", "name": "simplesamlphp/simplesamlphp" }, "ranges": [ { "events": [ { "introduced": "1.18.0" }, { "fixed": "1.18.4" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2020-5226" ], "database_specific": { "cwe_ids": [ "CWE-79" ], "github_reviewed": true, "github_reviewed_at": "2020-01-24T21:09:37Z", "nvd_published_at": null, "severity": "LOW" }, "details": "### Background\n\nSimpleSAMLphp allows users to report errors and failures to the system administrators via a web form. This web form gathers some contextual information automatically, but it also allows the user to provide their email address for follow-ups and a free-text explanation of what happened. Once submitted, the report is sent as an email to the administrative email address configured in the software.\n\n### Description\n\nThe `www/erroreport.php` script allows error reports to be submitted and sent to the system administrator. Starting with SimpleSAMLphp 1.18.0, a new `SimpleSAML\\Utils\\EMail` class was introduced to handle sending emails, implemented as a wrapper of an external dependency.\n\nThis new wrapper allows us to use Twig templates in order to create the email sent with an error report. Since Twig provides automatic escaping of variables, manual escaping of the free-text field in `www/errorreport.php` was removed to avoid double escaping. However, for those not using the new user interface yet, an email template is hardcoded into the class itself in plain PHP. Since no escaping is provided in this template, it is then possible to inject HTML inside the template by manually crafting the contents of the free-text field.\n\n### Affected versions\n\nSimpleSAMLphp versions 1.18.0 to 1.18.3, both inclusive.\n\n### Impact\n\nAn attacker may take advantage of this issue to manually craft a modified email sent via the error reporting mechanism, such as this email might trick a system administrator into performing an action, such as introducing their credentials into a phishing web site that resembles the original.\n\nRemote execution of javascript code is considered unfeasible since email clients do not run javascript present in emails, although there might be email clients which don\u0027t follow this rule, making the attack surface grow.\n\n### Resolution\n\nUpgrade the SimpleSAMLphp installation to version 1.18.4.\n\n### Credit\n\nThis vulnerability was discovered and reported by Frederic Vleminckx.", "id": "GHSA-mj9p-v2r8-wf8w", "modified": "2021-01-08T20:32:54Z", "published": "2020-01-24T21:26:54Z", "references": [ { "type": "WEB", "url": "https://github.com/simplesamlphp/simplesamlphp/security/advisories/GHSA-mj9p-v2r8-wf8w" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-5226" }, { "type": "WEB", "url": "https://simplesamlphp.org/security/202001-01" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N", "type": "CVSS_V3" } ], "summary": "Cross-site scripting in SimpleSAMLphp" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.