Cross-site request forgery

One click, two years later

The attacker never touches the server. The administrator’s own browser sends every request, with every cookie it needs.

PaperCut NG and MF manage printing for schools, councils and offices. The administration interface is a web application, and like most web applications it trusted any request that arrived with a valid administrator session cookie. It did not check whether the administrator had meant to send it.

Carlos Bello of Fluid Attacks reported the problem to PaperCut on 4 May 2023. His proof of concept was a web page that, opened by a logged-in administrator, quietly sent a series of requests to the PaperCut configuration editor: switch on print scripting, then switch off the print script sandbox. After that, a print job sent to the affected printer was enough to run code on the server. PaperCut fixed it in version 22.1.1 in June 2023 and published the CVE on 20 June. CISA added CVE-2023-2533 to its Known Exploited Vulnerabilities catalogue on 28 July 2025 — more than two years after the patch.

CVE
CVE-2023-2533
Product
PaperCut NG/MF before 22.1.1 (Fluid Attacks tested 22.0.10).
Class
Cross-site request forgery (CWE-352).
Severity
CVSS 3.1: 8.4 (High) from Fluid Attacks; 8.8 (High) from NVD.
Timeline
Reported 4 May 2023; fixed in 22.1.1, June 2023; CVE published 20 June 2023; added to CISA KEV 28 July 2025.
Fix
Upgrade to PaperCut NG/MF 22.1.1 or later, and keep administrative sessions short-lived and separate from everyday browsing.

The root cause, in one sentence

The server treated a valid session cookie as proof of intent, so any page an administrator visited could act as that administrator.

That is the whole bug class. The browser attaches cookies to requests no matter which site started them, unless something tells it not to. The attacker needs no password, no network access to the server and no foothold: the requests come from the administrator’s browser, which is why an interface reachable only from inside the network is still in range. What turned a configuration change into code execution was the setting it changed — a reminder that the severity of CSRF is set by the most powerful action it can reach, not by the bug itself.

We are not publishing an exploit page. PaperCut’s June 2023 bulletin lists the fixed versions. This post is about the bug class and how to test for it safely.

The five shapes cross-site request forgery takes

1. No protection at all

State-changing requests authenticated by a cookie alone, with no anti-forgery token and no check on where the request came from. Administration panels and older internal tools are the usual home, because “only staff use it” feels like a control.

2. Tokens that are present but not enforced

The form carries a token, but the server accepts the request when the token is missing, accepts any token, or accepts a token issued to a different user. The page looks protected; the endpoint is not.

3. Actions on GET

A link or an image tag is enough to trigger a change if the server performs it on a GET request. It also defeats the browser’s default SameSite=Lax protection, which still sends cookies on top-level GET navigations.

4. Trusting the wrong neighbour

SameSite works at the level of the registrable domain, not the exact host. A vulnerable or attacker-controlled subdomain of the same site can make requests the browser treats as same-site, and cookies set with SameSite=None are sent from anywhere.

5. JSON endpoints that also accept forms

An API expecting JSON is hard to forge from another site; an API that also accepts form-encoded or text/plain bodies, or that has a permissive cross-origin policy with credentials, is not.

“Requires a logged-in administrator” is not a mitigation. Administrators are logged in most of the working day and read email in the same browser. Scoring a CSRF as low because it needs a victim session misses that the victim is the point.

How we test for it

  1. List every state-changing action. Settings, user and role changes, password and email changes, payments, integrations and anything administrative.
  2. Check what proves intent. For each action we remove the token, replay another session’s token and change the method or content type, and see which the server still accepts.
  3. Check the cookies. We record each session cookie’s SameSite, Secure and HttpOnly attributes and note where a sibling subdomain could make same-site requests.
  4. Prove it with our own accounts. A proof of concept page is run only against test accounts we control, and chooses a harmless, reversible action.
  5. Rate it by what it reaches. The finding is scored on the most powerful action a forged request can perform, not on the fact that a click was needed.
  6. Report the precise fix. Which endpoints lack validation, and the framework’s built-in protection that closes them.

A good finding says exactly which request can be forged and what it does. Our reporting approach shows how we write them.

Six things to check in your application this week

  • Confirm your framework’s CSRF protection is switched on for every state-changing route, including administrative ones.
  • Make sure the server rejects requests with a missing or wrong token, not just ones with a malformed token.
  • Never change state on a GET request.
  • Set session cookies to SameSite=Lax or Strict, and avoid SameSite=None unless you genuinely need cross-site use.
  • Require re-authentication for the most sensitive settings, such as script execution, user roles and integrations.
  • Check that JSON APIs reject form-encoded and text/plain bodies.

Cross-site request forgery is old, well understood and still easy to miss, because the request it produces is indistinguishable from a real one. We check whether your application can tell the difference.

Build your quote