Skip to content
XSS Write-up Intermediate

Technical Advisory: Vulnerabilities Identified within ListServ

The ListServ application contained multiple vulnerabilities, including a cookie-based reflected cross-site scripting (XSS) flaw, cross-site request forgery (CSRF) in admin components, arbitrary file upload leading to stored XSS, a stack-based buffer overflow, and a local privilege escalation via DLL hijacking. An attacker could exploit these to execute scripts in a victim's browser, perform actions on behalf of an admin, upload malicious files, or potentially crash the service.

Adam Crosser Follow

Published on praetorian.com

Adam is an operator on the red team at Praetorian. He is currently focused on conducting red team operations and capabilities development.

Justin Copeland, on praetorian.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

ListServ is a mailing list management application. The advisory published by Praetorian on 18 October 2023 documents five vulnerabilities found in the product: a local privilege escalation via DLL hijacking, a cookie-based reflected cross-site scripting issue, cross-site request forgery in administrative components, an arbitrary file upload leading to stored cross-site scripting, and a stack-based buffer overflow. The work was carried out by Adam Crosser of Praetorian's red team.

From the original on praetorian.com

The advisory opens with the question of why the ListServ application was targeted at all, and then presents a summary table of the vulnerabilities identified.

From the original on praetorian.com

Setup

The disclosure timeline records that Praetorian told ListServ it tested the latest version available on the ListServ website. The advisory does not name a specific version number. No accounts, roles or tooling beyond that are described in the report.

Finding it

The report is structured around an exploration of the ListServ application architecture before moving into each individual finding. The architecture section is where the attack surface is mapped out.

From the original on praetorian.com

From there the advisory works through each vulnerability in turn, with the exploitation detail for each one set out in the sections below.

Exploitation

Local Privilege Escalation via DLL Hijacking

The first finding is a local privilege escalation achieved through DLL hijacking. The advisory illustrates the process across a sequence of screenshots.

From the original on praetorian.com

Cookie-Based Reflected Cross-Site Scripting

The second finding is a reflected cross-site scripting vulnerability that is reached through a cookie value.

From the original on praetorian.com

Cross Site Request Forgery in Admin Components

The third finding covers cross-site request forgery against administrative components of the application.

From the original on praetorian.com

Methods of Bypassing the SameSite = Lax Security Setting

The advisory discusses two ways in which a SameSite=Lax setting can be bypassed when attempting CSRF.

  1. Exploitation by Substituting POST with GET Requests: An attacker could exploit the fact that POST and GET requests are interchangeable due to the logic mentioned previously to perform a CSRF attack using GET requests against an endpoint that a POST request normally would invoke. The PortSwigger Web Academy documents this technique in an article titled "Bypassing SameSite Cookie Restrictions" under a subsection titled Bypassing SameSite Lax Restrictions Using GET Requests. This is the technique we use for exploitation within this article.
  2. Exploiting Vulnerable Adjacent Subdomains: Another potential exploitation vector when the SameSite security setting is set to "Lax" is to leverage vulnerable adjacent subdomains which the system considers as being part of the same-site even though they are within different origins. The Portswigger Web Academy explains the differences between a site and an origin in their article on "Bypassing SameSite Cookie Restrictions." The article then goes on to explain how the SameSite restrictions can be bypassed using vulnerable sibling domains.
From the original on praetorian.com

Arbitrary File Upload and Stored Cross Site Scripting

The fourth finding combines an arbitrary file upload with stored cross-site scripting.

From the original on praetorian.com

Stack Based Overflow Vulnerability

The fifth finding is a stack-based buffer overflow. The advisory notes three practical constraints on exploiting it:

  1. Exploitation of the vulnerability requires modifying the SMTP settings within the ListServ application, which could interfere with the core email-sending functionality of the application.
  2. The vulnerability is only triggered after a restart of the ListServ application, which is not possible to do from the primary user interface.
  3. A failed exploit attempt after triggering the stack-based overflow vulnerability effectively bricks the LSV service indefinitely until the attacker's malicious change to the SMTP_HOSTNAME variable is reverted.
From the original on praetorian.com

Root cause

The report notes that POST and GET requests are interchangeable due to the application logic, and that the GET-based technique is the one used for exploitation in the article. The report says a failed exploit attempt leaves the LSV service bricked until the malicious change to the SMTP_HOSTNAME variable is reverted.

Impact

The DLL hijacking gives local privilege escalation. The arbitrary file upload leads to stored XSS, and the stack-based overflow has the caveats above: it needs a change to the SMTP settings, it only triggers after an application restart that cannot be performed from the primary user interface, and a failed attempt leaves the LSV service unusable until the SMTP_HOSTNAME change is reverted.

Fix

No patch was available from ListServ at the time of release. The advisory was published on 18 October 2023 with the vulnerabilities still unpatched.

Variants to test

Vulnerability Disclosure Timeline

  • July 18th, 2023, Praetorian made an initial contact with ListServ's support email address to verify it was the appropriate email address to report security issues given the lack of documented reporting channels. ListServ responded on the same day that this was the appropriate channel for reporting security issues.
  • July 19th, 2023, Praetorian provided writeups documenting the five discovered vulnerabilities to ListServ support. ListServ support responded on the same day indicating that they were conducting internal discussions regarding the technical details of these vulnerabilities.
  • July 21st, 2023, ListServ requested information on the ListServ version Praetorian used for testing. Praetorian provided information on the version we used, which was the latest version available on the ListServ website. ListServ responded indicating that they are still discussing these issues internally.
  • August 17th, 2023, Praetorian followed up with ListServ as there had been no further communication with ListServ since July 21st, 2023. ListServ responded that they were still discussing the issues internally.
  • September 11th, 2023, Praetorian followed up again with ListServ indicating that it had been 55 days since the initial disclosure and indicated that we planned to disclose these issues at the 90 day mark if they had not been remediated by that point. ListServ replied indicating that the issue had been escalated to their development team.
  • September 27th, 2023, Praetorian followed up again with ListServ indicating that it had been roughly 70 days since the initial disclosure and reiterated that we plan to release technical details at the 90 day mark. ListServ responded they were still waiting to hear back from their development team.
  • October 10th, 2023, Praetorian followed up again indicating that we planned to release the blog post detailing the vulnerabilities on October 16th, 2023. Praetorian did not receive a response from ListServ.
  • October 18th, 2023, Praetorian released the technical blog post with no patch available from ListServ.

About the Authors

Adam Crosser
Adam Crosser From the original on praetorian.com

Adam is an operator on the red team at Praetorian. He is currently focused on conducting red team operations and capabilities development.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

ListServ is a program that organisations use to run email mailing lists: one address that many people subscribe to, and software that sends messages to everyone on the list. Praetorian found five separate security problems in the product and began reporting them in July 2023. Adam Crosser, who works on Praetorian's red team (a group of testers who attack systems on purpose, with permission, to find weaknesses before criminals do), wrote the findings up. The write-up was published on 18 October 2023, and at that point ListServ had not released a fix.

The five problems, in the order the write-up covers them, are:

  1. A local privilege escalation via DLL hijacking.
  2. A way to make a victim's browser run code supplied through a cookie (cookie-based reflected cross-site scripting).
  3. A way to make a logged-in administrator's browser perform actions they did not intend (cross-site request forgery in admin components).
  4. An arbitrary file upload leading to stored cross-site scripting.
  5. A stack-based buffer overflow.
From the original on praetorian.com

Why target ListServ at all?

The write-up opens by asking why anyone would look at this product in the first place. The report then presents a summary table of the vulnerabilities it identified.

From the original on praetorian.com

Exploring the application architecture

The report has a section exploring the ListServ application architecture before the individual findings. This is the same as a burglar walking around a building first and noting the doors, windows and back entrances before trying any of them. The architecture section is where that map of the attack surface is drawn.

From the original on praetorian.com

The five findings

1. Local privilege escalation via DLL hijacking

Some words first. On Windows, much of a program's code lives in separate files called DLLs (dynamic link libraries). When a program starts, Windows has to find each DLL it needs. It looks in a list of folders in a set order. If an attacker can put a file with the right name into a folder that Windows checks before the legitimate one, the program will load the attacker's file instead. That is DLL hijacking. "Local privilege escalation" means the attacker already has some access to the machine, usually as an ordinary user, and uses the weakness to become a more powerful user, such as an administrator. The everyday comparison: a courier is told to collect a parcel from "the usual place", and if someone else puts a fake parcel there first, the courier picks up the fake one without checking.

The write-up illustrates the process across a sequence of screenshots.

From the original on praetorian.com

2. Cookie-based reflected cross-site scripting

A cookie is a small piece of text that a website asks your browser to store and send back with every request to that site. It is how a site remembers who you are between page loads, for example that you are logged in. "Cross-site scripting", usually shortened to XSS, means getting a website to send JavaScript (the programming language browsers run) to a victim's browser, where it runs as if the site itself had written it. "Reflected" means the malicious value is not stored on the server; it is bounced straight back in the response to the request that carried it.

From the original on praetorian.com

3. Cross-site request forgery in admin components

Cross-site request forgery, or CSRF, works like this: your browser automatically attaches your cookies to every request it makes to a site, including requests triggered by a different site you happen to visit. If the target site accepts an action based only on the presence of that cookie, another site can quietly cause the action to happen. The everyday comparison: a signed permission slip that a bank accepts from anyone who hands it over, without checking who is handing it over. The write-up covers CSRF against administrative parts of the application.

From the original on praetorian.com

Bypassing the SameSite=Lax setting

Modern browsers have a defence called SameSite. A cookie marked SameSite=Lax is not sent when a request originates from a different site, except in one case: when the user navigates to the target site directly, for example by clicking a link. The write-up describes two ways around Lax and uses the GET technique for exploitation. It describes two ways around Lax:

  1. Exploitation by Substituting POST with GET Requests: An attacker could exploit the fact that POST and GET requests are interchangeable due to the logic mentioned previously to perform a CSRF attack using GET requests against an endpoint that a POST request normally would invoke. The PortSwigger Web Academy documents this technique in an article titled "Bypassing SameSite Cookie Restrictions" under a subsection titled Bypassing SameSite Lax Restrictions Using GET Requests. This is the technique we use for exploitation within this article.
  2. Exploiting Vulnerable Adjacent Subdomains: Another potential exploitation vector when the SameSite security setting is set to "Lax" is to leverage vulnerable adjacent subdomains which the system considers as being part of the same-site even though they are within different origins. The Portswigger Web Academy explains the differences between a site and an origin in their article on "Bypassing SameSite Cookie Restrictions." The article then goes on to explain how the SameSite restrictions can be bypassed using vulnerable sibling domains.

In plain words: a POST request is the kind a browser sends when you submit a form, and a GET request is the kind it sends when you click a link. If the application treats the two as interchangeable, an attacker can put the action into a link, and a click on that link is a top-level navigation, which Lax allows. The second route relies on the difference between a "site" (roughly, the main domain name) and an "origin" (the exact scheme, host and port). Two subdomains of the same site count as same-site for the cookie rule even though they are different origins, so a weakness on one subdomain can be used to reach another.

From the original on praetorian.com

4. Arbitrary file upload and stored cross-site scripting

"Arbitrary file upload" means the application lets a user upload a file of any type, not just the harmless kinds it expects. "Stored" XSS means the malicious content is saved on the server and served to every user who later views it, rather than being reflected back once. The everyday comparison: a suggestion box that accepts anything, including a letter bomb, and then forwards it to everyone who opens the box.

From the original on praetorian.com

5. Stack-based buffer overflow

A buffer is a fixed-size area of memory a program reserves to hold a value, such as a hostname. A buffer overflow happens when more data is written into it than it can hold, so the extra data spills into neighbouring memory. On the "stack", which is the region where a program keeps track of which function called which, that spill can overwrite the record of where to return when the current function finishes, which can crash the program or, in the worst case, let an attacker control what it does next. The everyday comparison: pouring a litre of water into a 250 ml glass; the excess goes everywhere and ruins whatever is next to it.

The write-up notes three practical constraints on exploiting this one:

  1. Exploitation of the vulnerability requires modifying the SMTP settings within the ListServ application, which could interfere with the core email-sending functionality of the application.
  2. The vulnerability is only triggered after a restart of the ListServ application, which is not possible to do from the primary user interface.
  3. A failed exploit attempt after triggering the stack-based overflow vulnerability effectively bricks the LSV service indefinitely until the attacker's malicious change to the SMTP_HOSTNAME variable is reverted.

SMTP is the protocol servers use to send email between each other. LSV is the service named in the write-up's caveat about a failed exploit attempt. "Bricks" means it stops working completely, as if it had turned into a brick, until someone undoes the change.

From the original on praetorian.com

Root cause

The report notes that POST and GET requests are interchangeable due to the application logic, and that the GET-based technique is the one used for exploitation in the article. The report says a failed exploit attempt leaves the LSV service bricked until the malicious change to the SMTP_HOSTNAME variable is reverted.

Impact

The DLL hijacking gives local privilege escalation. The arbitrary file upload leads to stored XSS, and the stack-based overflow has the caveats above: it needs a change to the SMTP settings, it only triggers after an application restart that cannot be performed from the primary user interface, and a failed attempt leaves the LSV service unusable until the SMTP_HOSTNAME change is reverted.

Fix

No patch was available from ListServ at the time of release. The write-up was published on 18 October 2023 with the vulnerabilities still unpatched.

Variants to test

Vulnerability disclosure timeline

The write-up records how the findings were reported and what happened afterwards:

  • July 18th, 2023, Praetorian made an initial contact with ListServ's support email address to verify it was the appropriate email address to report security issues given the lack of documented reporting channels. ListServ responded on the same day that this was the appropriate channel for reporting security issues.
  • July 19th, 2023, Praetorian provided writeups documenting the five discovered vulnerabilities to ListServ support. ListServ support responded on the same day indicating that they were conducting internal discussions regarding the technical details of these vulnerabilities.
  • July 21st, 2023, ListServ requested information on the ListServ version Praetorian used for testing. Praetorian provided information on the version we used, which was the latest version available on the ListServ website. ListServ responded indicating that they are still discussing these issues internally.
  • August 17th, 2023, Praetorian followed up with ListServ as there had been no further communication with ListServ since July 21st, 2023. ListServ responded that they were still discussing the issues internally.
  • September 11th, 2023, Praetorian followed up again with ListServ indicating that it had been 55 days since the initial disclosure and indicated that we planned to disclose these issues at the 90 day mark if they had not been remediated by that point. ListServ replied indicating that the issue had been escalated to their development team.
  • September 27th, 2023, Praetorian followed up again with ListServ indicating that it had been roughly 70 days since the initial disclosure and reiterated that we plan to release technical details at the 90 day mark. ListServ responded they were still waiting to hear back from their development team.
  • October 10th, 2023, Praetorian followed up again indicating that we planned to release the blog post detailing the vulnerabilities on October 16th, 2023. Praetorian did not receive a response from ListServ.
  • October 18th, 2023, Praetorian released the technical blog post with no patch available from ListServ.
Adam Crosser
Adam Crosser From the original on praetorian.com

Adam is an operator on the red team at Praetorian. He is currently focused on conducting red team operations and capabilities development.

Glossary

  • API: a defined way for one piece of software to ask another to do something, like a menu of requests a program accepts.
  • Attack surface: all the places an attacker could try to get in, such as web pages, upload forms and background services.
  • Buffer: a fixed-size area of memory set aside to hold a value.
  • Buffer overflow: writing more data into a buffer than it can hold, so the extra data spills into neighbouring memory.
  • Cookie: a small piece of text a website asks your browser to store and send back with later requests, often used to remember that you are logged in.
  • Cross-site request forgery (CSRF): tricking a logged-in user's browser into sending a request the user did not intend, because the browser attaches their cookies automatically.
  • Cross-site scripting (XSS): getting a website to deliver JavaScript to a victim's browser, where it runs as if the site itself had written it.
  • DLL: a file on Windows containing code that programs load and share, short for dynamic link library.
  • DLL hijacking: placing a malicious file with the name of a DLL where a program will find it before the real one, so the program loads the attacker's code.
  • GET request: the kind of request a browser sends when you click a link or load a page.
  • JavaScript: the programming language that browsers run to make web pages interactive.
  • Local privilege escalation: turning limited access to a machine into more powerful access, such as becoming an administrator.
  • LSV service: the ListServ service named in the write-up as the component affected by the stack overflow.
  • Origin: the exact combination of scheme, host and port that a browser uses to decide what counts as the same place, for example https, a hostname and a port number.
  • POST request: the kind of request a browser sends when you submit a form, typically used for actions that change something.
  • Red team: testers who attack a system on purpose, with permission, to find weaknesses before criminals do.
  • Reflected XSS: XSS where the malicious value is bounced straight back in the response rather than saved on the server.
  • SameSite: a cookie setting that tells the browser when to send the cookie with requests coming from other sites; Lax allows it on top-level navigation such as clicking a link.
  • Site: roughly, the main domain name a set of pages belongs to, which can include several subdomains.
  • SMTP: the protocol mail servers use to send email to each other.
  • SMTP_HOSTNAME: the ListServ setting that names the mail server the application talks to.
  • Stack: the area of memory where a program keeps track of which function called which, including where to return when a function finishes.
  • Stored XSS: XSS where the malicious content is saved on the server and served to every user who later views it.
  • Subdomain: a named part of a larger domain, such as shop in shop.example.com.
  • Top-level navigation: when the browser leaves the current page and loads a new one, for example because you clicked a link.
  • Vulnerability: a weakness in software that someone could use to make it behave in a way its makers did not intend.

More by Adam Crosser

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.