Skip to content
Access control Disclosed report Beginner

User with only Viewing Privilege can send message to Room

A user with only viewing privilege could send messages to a chat room by crafting a POST request, bypassing the intended restriction. This allowed unauthorised message posting despite the absence of a send form.

lucasveigaf Follow

Originally disclosed on HackerOne

Bounty$300 Low View original
  • Fixed in under an hour
  • Paid in under an hour
  • Disclosed after 3 hours

Hey, mongoose

When the owner of a chat room gives any user Viewing Privilege, that user can then send messages to the room. As expected, there's no form to send messages when the user access the room since in theory it shouldn't be possible. However, messages via POST requests can still be sent and processed.

The Severity of this issue is marked as low, but it still can be a serious problem depending on the scenario.

Steps to reproduce

  1. Create a new room
  2. Give only Viewing Privilege to a user or all users
  3. Send the following POST as the user with Viewing Privilege only
  4. Refresh browser and see the message sent
POST /conpherence/update/1/ HTTP/1.1
Host: 192.168.25.10
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Phabricator-Csrf: B@6uaixbh422c60ea95853fee4
X-Phabricator-Via: /
Content-Type: application/x-www-form-urlencoded
Content-Length: 110
Cookie: phsid=35yvcfc22xj27th6hwawazghx5cnritidfccxdhh; phusr=lucasveiga
Connection: close

__form__=1&action=message&text=TESTTEXT&latest_transaction_id=10&__wflow__=true&__ajax__=true&__metablock__=6

This isn't session related since logging in and out doesn't affect anything. Just replace "X-Phabricator-Csrf" and "phsid" with the new ones and the message still will be sent.

Let me know if you need further information.

The original report as published on HackerOne, by lucasveigaf. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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. 6 min read.

Context

Phabricator is a suite of web applications that includes Conpherence, its chat room feature. A room has an owner who can grant other users access, and one of the access levels available is Viewing Privilege. As the name suggests, a user with only that privilege is meant to be able to read the room but not post to it. The interface reflects this: when such a user opens the room, there is no form for sending a message, because in theory sending one should not be possible.

The report shows that the restriction was enforced only at the level of the user interface. The server-side endpoint that handles room updates still accepted and processed a message from a user who held nothing more than Viewing Privilege.

Setup

To reproduce the issue you need:

  1. A Phabricator instance with Conpherence available.
  2. An account that can create a room and act as its owner.
  3. A second user, or the set of all users, granted only Viewing Privilege on that room.
  4. A way to send arbitrary HTTP requests as the restricted user, for example a proxy or an intercepted browser request, so that the CSRF token and session cookie of that user can be placed in a hand-crafted POST.

The report does not state the Phabricator version tested. The example request targets a host on a private network address, which has been redacted here.

Finding it

The researcher observed that a Viewing Privilege user can still send a message through the update endpoint, even though no form is shown. Nothing in the UI lets the user compose a message, but the underlying update endpoint is the same one used by users who are allowed to post. If that endpoint does not re-check the privilege level of the caller, a POST request built by hand will be accepted and the message stored, even though the sender was never shown a way to send it.

The researcher also checked whether the behaviour depended on the session. It does not: logging in and out makes no difference, and replacing the CSRF token and the session cookie with fresh values still results in the message being sent. That points to a missing authorisation check on the action itself rather than anything tied to a particular session state.

Exploitation

Step 1: Create a new room

The owner creates a room in Conpherence as usual.

Step 2: Grant only Viewing Privilege

Give only Viewing Privilege to a specific user, or to all users. No other permission is granted, so the recipient should be limited to reading.

Step 3: Send the update request as the restricted user

As the user who holds only Viewing Privilege, send the following POST:

HTTP
POST /conpherence/update/1/ HTTP/1.1
Host: [redacted]
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Phabricator-Csrf: [redacted]
X-Phabricator-Via: /
Content-Type: application/x-www-form-urlencoded
Content-Length: 110
Cookie: phsid=[redacted]; phusr=[redacted]
Connection: close

__form__=1&action=message&text=TESTTEXT&latest_transaction_id=10&__wflow__=true&__ajax__=true&__metablock__=6

The important parts:

  • The path /conpherence/update/1/ is the room update endpoint, with 1 identifying the room.
  • X-Phabricator-Csrf carries the CSRF token for the restricted user's session, and the Cookie header carries that user's phsid session identifier and phusr username. Both are taken from the restricted user's own authenticated session, so the request is genuinely made as that user.
  • The body is form-encoded. action=message selects the message action, text=TESTTEXT is the message body, and latest_transaction_id=10 refers to the current transaction in the room. The remaining fields (__form__, __wflow__, __ajax__, __metablock__) are the usual Phabricator form and workflow markers.

The server processes the request and the message is sent. The report does not include the response body, only the outcome observed in the next step.

Step 4: Confirm the message

Refresh the browser and the message sent in the previous step is visible in the room. The restricted user has therefore written to a room they were only authorised to read.

Root cause

The authorisation model for Conpherence rooms was enforced in the presentation layer: the message form is hidden from users who lack posting rights, but the update endpoint that handles action=message does not verify that the caller holds the privilege required to post. The request succeeds with a valid CSRF token and session cookie, but those do not prevent the action. The report does not describe the server-side code, so the exact location of the missing check is not stated.

Impact

The direct effect is that a user with only Viewing Privilege can post messages into a room. The researcher rates the severity as low but notes that it can be a serious problem depending on the scenario: a read-only room, for example one used to broadcast announcements to a wide audience, can be written to by anyone who has been granted viewing access, including all users if that is how the room was configured.

Fix

The check that should exist is a server-side verification, on the update endpoint, that the caller holds the privilege required for the requested action, rather than relying on the client not being shown a form.

Variants to test

  1. Other room actions. Try the same endpoint with different action values (for example editing or deleting content) as a Viewing Privilege user. A positive result is any state change that the UI does not offer to that user.
  2. Other privilege levels. Repeat with users holding intermediate or restricted roles on other object types, such as tasks, documents or wikis, where the UI hides controls but the underlying update endpoint may not check permissions.
  3. Direct endpoint access across objects. Change the object identifier in the path (the 1 in /conpherence/update/1/) to a room the user can see but not post to, or cannot see at all. A positive result is a stored change or a response that reveals the object.
  4. Session independence. As the researcher did, log out and back in, replace the CSRF token and session cookie, and resend. If the action still succeeds, the problem is in the authorisation logic rather than in session handling.

Hunting notes

This class of bug tends to hide wherever a permission is expressed only by hiding UI elements: chat and comment features, attachment uploads, status changes and any endpoint that accepts an action parameter. During recon, look for endpoints whose forms disappear when you downgrade a role, then replay the request captured at the higher privilege level with the lower-privilege account's token and cookie. The signal is a request that the interface would never generate for that user but that the server still accepts.

The researcher demonstrated impact with a minimal, repeatable sequence: create a room, grant only Viewing Privilege, send the crafted POST, refresh and see the message. Showing that the behaviour survives a fresh login and new CSRF token and session values ruled out a session artefact and made the missing authorisation check clear.

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. 12 min read.

What happened, in plain words

Phabricator is a collection of web applications for teams, and one of its features is called Conpherence, which is a chat room tool. Think of a group chat where someone creates a room and decides who can do what inside it. One of the access levels a room owner can hand out is called Viewing Privilege. The name says it all: a person with only that privilege should be able to read what is in the room, but not write anything into it.

The website behaves as if that rule is real. When a user who only has Viewing Privilege opens the room, there is no box to type a message and no send button. From the user's point of view, posting is simply not offered.

But the researcher found that hiding the form was not enough. The web page hid the form, yet the part of the server that actually saves messages was still willing to accept one from that user. In security terms, the rule was enforced in the "presentation layer" (what you see on screen) and not in the "server-side authorisation" (the check the server should make before doing something).

This kind of bug is called a privilege escalation: a user manages to do something that their permissions were supposed to forbid. The researcher rated it low severity, but pointed out that it could be a serious problem depending on the scenario.

Background ideas you need first

Before walking through the steps, here are a few everyday ideas that make the rest easier to follow.

  • Server and browser. Your browser is the program on your computer that shows web pages. The server is the computer somewhere else that stores the data and decides what to send back. When you click something, your browser sends a request to the server, and the server replies.
  • HTTP request. A request is a short text message the browser sends to the server. It has a first line saying what it wants (for example, "give me this page"), a set of headers (extra labels with details), and sometimes a body (the actual content, such as a form you filled in).
  • POST request. There are different types of request. A GET request is normally used just to fetch a page. A POST request is used to send data that changes something on the server, such as submitting a form or posting a message. If a website lets you write something, a POST request is usually what carries it.
  • Endpoint. An endpoint is a specific address on the server that handles one kind of action. Think of it as a particular counter in a large office: one counter handles new messages, another handles deleting them. In the request below, the endpoint is the path /conpherence/update/1/.
  • Cookie. A cookie is a small piece of text that the server gives your browser and your browser sends back on every later request. It is how the server recognises you between page loads, like a wristband at an event that proves you already checked in. The main cookie here is phsid, which identifies your session.
  • Session. A session is the server's memory of you being logged in. The cookie is the ticket; the session is the record on the server side that the ticket belongs to.
  • CSRF token. CSRF stands for Cross-Site Request Forgery. A CSRF token is a secret value that the server puts into forms so it can tell that a request really came from its own pages and not from a malicious site trying to trick your browser. It is like a stamped form that only the office itself can issue. In Phabricator the token travels in a header called X-Phabricator-Csrf.
  • Header. Headers are the labelled lines at the top of a request, such as Host or Cookie. They carry information about the request rather than the content itself.
  • Form-encoded body. When a browser submits a form, it packs the fields into the body as pairs like name=value joined by &. That is what application/x-www-form-urlencoded means in the Content-Type header.
  • Proxy or interception tool. A program that sits between your browser and the server so you can look at, pause and edit requests before they are sent. It is how a tester turns a normal click into a hand-written request.

Setup

To reproduce the issue you need:

  1. A Phabricator instance with Conpherence available.
  2. An account that can create a room and act as its owner.
  3. A second user, or the set of all users, granted only Viewing Privilege on that room.
  4. A way to send arbitrary HTTP requests as the restricted user, for example a proxy or an intercepted browser request, so that the CSRF token and session cookie of that user can be placed in a hand-crafted POST.

The report does not state which Phabricator version was tested. The example request points at a host on a private network address, which is redacted here.

Finding it

The researcher noticed that a Viewing Privilege user can still send a message through the update endpoint, even though no message box is shown. Nothing in the interface lets a Viewing Privilege user compose a message, but the endpoint that saves messages is the very same one used by people who are allowed to post. If that endpoint does not look again at the caller's privilege level, then a POST request written by hand will be accepted and the message stored, even though the sender was never shown a way to send it.

The researcher also checked whether the behaviour depended on the session. It does not: logging in and out makes no difference, and replacing the CSRF token and the session cookie with fresh values still results in the message being sent. That points to a missing authorisation check on the action itself rather than anything tied to a particular session state.

Exploitation

Step 1: Create a new room

The owner creates a room in Conpherence as usual. This gives us a target: a room with a known owner and a known address on the server.

Step 2: Grant only Viewing Privilege

Give only Viewing Privilege to a specific user, or to all users. No other permission is granted, so the recipient should be limited to reading. This is the whole point of the test: we want an account that the site itself considers read-only, so that anything it manages to write is clearly outside its rights.

Step 3: Send the update request as the restricted user

As the user who holds only Viewing Privilege, send the following POST:

HTTP
POST /conpherence/update/1/ HTTP/1.1
Host: [redacted]
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
X-Phabricator-Csrf: [redacted]
X-Phabricator-Via: /
Content-Type: application/x-www-form-urlencoded
Content-Length: 110
Cookie: phsid=[redacted]; phusr=[redacted]
Connection: close

__form__=1&action=message&text=TESTTEXT&latest_transaction_id=10&__wflow__=true&__ajax__=true&__metablock__=6

Line by line, in plain words:

  • POST /conpherence/update/1/ HTTP/1.1 is the first line. It says: send a POST request to the path /conpherence/update/1/, using version 1.1 of the HTTP protocol. The path is the room update endpoint, and the 1 identifies the room.
  • Host: [redacted] tells the server which machine the request is addressed to. Here it is a private network address, redacted in this copy.
  • User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 says which browser and operating system the request claims to come from. It is the normal label a Firefox browser sends.
  • Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 lists the kinds of response the browser is willing to receive, with rough preference weights.
  • Accept-Language: en-US,en;q=0.5 says the browser prefers English (United States).
  • Accept-Encoding: gzip, deflate says the browser can accept a compressed response to save bandwidth.
  • X-Phabricator-Csrf: [redacted] carries the CSRF token for the restricted user's session. This is the stamped form described earlier: it proves the request was built with knowledge of the user's own page. It is taken from that user's authenticated session, so the request is genuinely made as that user.
  • X-Phabricator-Via: / is a Phabricator-specific header recording which page the request came through.
  • Content-Type: application/x-www-form-urlencoded announces that the body is packed as form fields.
  • Content-Length: 110 says the body is 110 bytes long, so the server knows where it ends.
  • Cookie: phsid=[redacted]; phusr=[redacted] carries the user's cookies. phsid is the session identifier and phusr is the username. Together they tell the server who is making the request.
  • Connection: close asks the server to close the connection after replying.
  • The blank line separates the headers from the body.
  • __form__=1&action=message&text=TESTTEXT&latest_transaction_id=10&__wflow__=true&__ajax__=true&__metablock__=6 is the body. action=message selects the message action, text=TESTTEXT is the message body, and latest_transaction_id=10 refers to the current transaction in the room. The remaining fields (__form__, __wflow__, __ajax__, __metablock__) are the usual Phabricator form and workflow markers.

The server processes the request and the message is sent. The report does not include the response body, only the outcome observed in the next step.

Step 4: Confirm the message

Refresh the browser and the message sent in the previous step is visible in the room. The restricted user has therefore written to a room they were only authorised to read. Refreshing the browser shows the message in the room.

Root cause

The authorisation model for Conpherence rooms was enforced in the presentation layer: the message form is hidden from users who lack posting rights, but the update endpoint that handles action=message does not verify that the caller holds the privilege required to post. The request succeeds with a valid CSRF token and session cookie, but those do not prevent the action. In everyday terms, the door staff checked your ticket at the entrance but nobody checked whether your ticket allowed you into that particular room. The report does not describe the server-side code, so the exact location of the missing check is not stated.

Impact

The direct effect is that a user with only Viewing Privilege can post messages into a room. The researcher rates the severity as low but notes that it can be a serious problem depending on the scenario: a read-only room, for example one used to broadcast announcements to a wide audience, can be written to by anyone who has been granted viewing access, including all users if that is how the room was configured.

Fix

The check that should exist is a server-side verification, on the update endpoint, that the caller holds the privilege required for the requested action, rather than relying on the client not being shown a form.

Variants to test

  1. Other room actions. Try the same endpoint with different action values (for example editing or deleting content) as a Viewing Privilege user. A positive result is any state change that the UI does not offer to that user.
  2. Other privilege levels. Repeat with users holding intermediate or restricted roles on other object types, such as tasks, documents or wikis, where the UI hides controls but the underlying update endpoint may not check permissions.
  3. Direct endpoint access across objects. Change the object identifier in the path (the 1 in /conpherence/update/1/) to a room the user can see but not post to, or cannot see at all. A positive result is a stored change or a response that reveals the object.
  4. Session independence. As the researcher did, log out and back in, replace the CSRF token and session cookie, and resend. If the action still succeeds, the problem is in the authorisation logic rather than in session handling.

Hunting notes

This class of bug tends to hide wherever a permission is expressed only by hiding UI elements: chat and comment features, attachment uploads, status changes and any endpoint that accepts an action parameter. During recon, look for endpoints whose forms disappear when you downgrade a role, then replay the request captured at the higher privilege level with the lower-privilege account's token and cookie. The signal is a request that the interface would never generate for that user but that the server still accepts.

The researcher demonstrated impact with a minimal, repeatable sequence: create a room, grant only Viewing Privilege, send the crafted POST, refresh and see the message. Showing that the behaviour survives a fresh login and new CSRF token and session values ruled out a session artefact and made the missing authorisation check clear.

Glossary

  • API: a defined set of addresses and rules a program uses to talk to a server, so actions can be requested in a structured way.
  • Authorisation: the decision about whether a user is allowed to perform a particular action, as opposed to merely being logged in.
  • Authentication: proving who you are, for example by logging in; it comes before authorisation.
  • Body: the part of an HTTP request that carries content, such as form fields.
  • Browser: the program on your computer that displays web pages and sends requests to servers.
  • Conpherence: the chat room feature of Phabricator.
  • Cookie: a small piece of text stored by the browser and sent back to the server on later requests, used to recognise you.
  • CSRF (Cross-Site Request Forgery): an attack where a malicious site tricks your browser into sending a request you did not intend; a CSRF token is the defence.
  • CSRF token: a secret value placed in forms and requests so the server can tell a genuine request from a forged one.
  • CVSS: a standard scoring system for rating the severity of a vulnerability.
  • Endpoint: a specific address on a server that handles one kind of action.
  • Form-encoded: a way of packing form fields into a request body as name=value pairs joined by &.
  • GET request: a request normally used just to fetch a page or data, without changing anything.
  • Header: a labelled line at the top of an HTTP request or response carrying extra information.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • Impact: the practical harm a vulnerability can cause.
  • POST request: a request used to send data that changes something on the server, such as submitting a form.
  • Presentation layer: the part of an application that decides what the user sees on screen.
  • Privilege: a permission granted to a user, such as the right to read or to post.
  • Privilege escalation: a bug where a user manages to do something their permissions were supposed to forbid.
  • Proxy: a tool that sits between browser and server so requests can be inspected and edited.
  • Recon: the exploratory phase of testing, where you map out what a site offers and how it behaves.
  • Request: the message a browser sends to a server asking it to do something.
  • Response: the message a server sends back to a browser.
  • Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
  • Server: the remote computer that stores data and decides what to send back.
  • Session: the server's record of you being logged in, identified by a cookie.
  • Severity: a rating of how serious a vulnerability is.
  • UI (user interface): everything you see and interact with on screen.
  • Viewing Privilege: the Conpherence access level that should allow reading a room but not posting to it.
  • Vulnerability: a weakness in software that allows behaviour the designers did not intend.

More from Phabricator

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.