Exposing voting results on the Slowvote application without actually voting
The Slowvote poll application allowed a user to see results without voting by submitting an invalid vote option. An attacker could bypass the requirement to vote before viewing poll responses.
- Fixed in 20 hours
- Paid in 20 hours
- Disclosed after 21 hours
Description
There is a feature on the Phabricator Slowvote application which allows creating polls and asking questions. The poll creator can choose to only allow people who voted to actually see the poll results. However, it seems that by sending an illegal vote a user can still see the poll's results.
Steps to reproduce
- As user1 creator a poll on the Slowvote application and make it visible for anyone and also check the "Require a vote to see the responses" option.
- As user2 browse to the poll and see that since you haven't voted you can't see the actual result.
- As user2 choose one of the options and vote while intercepting the request.
- Change the "vote%5B%5D" parameter to contain an illegal vote_id (usually just a big number should be enough).
- See that you can now see the poll's results but you didn't actually vote.
Mitigation
You should probably verify that the user is actually voting for a valid option.
Impact
An unauthorized user can see poll results without making a vote as required by an admin.
Context
Phabricator is a suite of web applications for software development, and one of its applications is Slowvote, a tool for creating polls and asking questions. A poll creator can configure a poll so that only people who have voted are allowed to see the results. The intent is straightforward: the responses stay hidden from anyone who has not cast a vote.
The report shows that this restriction can be bypassed. By sending a vote that is not a valid option, a user can make the application believe they have voted, and the results become visible even though no real vote was cast.
Setup
Two accounts are needed:
user1, the poll creator.user2, the user who should not see the results until voting.
A proxy that can intercept and modify requests is required, because the bypass depends on editing the vote request in flight. No specific Phabricator version is given in the report.
Finding it
The researcher looked at the Slowvote poll feature and its option to require a vote before responses are shown. The report shows that a request carrying an invalid vote identifier still unlocks the results, which suggests the submitted vote is not validated against the poll's options. That suggested a request carrying an invalid vote identifier might satisfy the visibility check without recording a real choice.
Exploitation
Step 1: Create a restricted poll
As user1, create a poll on the Slowvote application. Make it visible to anyone and enable the option labelled "Require a vote to see the responses".
This sets up the condition under test: the results should only be shown to users who have voted.
Step 2: Confirm the restriction
As user2, browse to the poll. Because user2 has not voted, the actual results are not shown. This confirms the restriction is active for the account.
Step 3: Vote with interception
As user2, choose one of the options and submit the vote, but intercept the request so it can be modified before it reaches the server.
The vote is carried in a parameter named vote%5B%5D, which is the URL-encoded form of vote[].
Step 4: Replace the vote with an invalid identifier
Change the vote%5B%5D parameter so that it contains an illegal vote_id. The report notes that a large number is usually enough.
The value no longer corresponds to any real option in the poll. The request is then forwarded.
Step 5: Observe the results
After the modified request is processed, user2 can see the poll's results, even though no actual vote was cast. The results became visible even though no actual vote was cast.
Root cause
The report's mitigation section states the likely cause directly: the application should verify that the user is actually voting for a valid option. An invalid vote identifier was enough to unlock the results in the reported case. The report does not describe the server-side code, so the exact validation path is not shown.
Impact
An unauthorised user can see poll results without making a vote, defeating the requirement set by an administrator that a vote be cast first.
Fix
The report recommends verifying that the user is actually voting for a valid option. The report does not state which change, if any, was made.
Variants to test
- Submit an array containing both a valid and an invalid identifier, for example a real option plus a large number, and check whether the results unlock while the recorded vote is unaffected.
- Submit an empty array or a missing
vote[]parameter and see whether the visibility check still passes. - Submit an identifier belonging to a different poll and check whether it is accepted.
- Submit a non-numeric value in
vote[]and observe whether it is rejected or treated as a vote. - On other applications with "vote to see results" style gates, look for the same pattern: a visibility decision based on the presence of a submission rather than on validation of its contents.
A positive result in each case is that the results become visible without a legitimate vote being recorded.
Hunting notes
This kind of bug hides in features that gate content on a user action, such as voting, rating or completing a step. The signal during recon is a setting that ties visibility to participation: if the application checks participation separately from the validity of the action, an invalid submission may satisfy the check. The researcher showed the results were visible to an account that had not voted, which the poll creator's setting was meant to prevent.
Difficulty
{"difficulty": "beginner", "difficulty_reason": "The bypass needs only a proxy and a single parameter edit, with no chaining or deep code analysis."}
What happened, in plain words
Phabricator is a collection of web applications that teams use to build software together. One of those applications is called Slowvote, and it lets people create polls: a question with a list of options that other people can vote on.
When you create a poll in Slowvote, you can switch on an option called "Require a vote to see the responses". The idea is simple: if you have not voted yet, you are not allowed to see how everyone else voted. You have to cast your own vote first, and only then do the results appear.
This report shows that the rule can be broken. A user can send a vote that is not a real option in the poll at all, and the application still treats them as having voted. The results then become visible, even though the person never actually voted for anything.
The trick is small: you vote normally, but you catch the request on its way to the server and change the number that says which option you picked to a number that does not exist. The results unlock, even though no real vote was cast.
The pieces you need to understand first
Before walking through the steps, here are a few ideas that come up again and again.
- A web application is a program that runs on a server and that you use through your browser. When you click a button, your browser sends a message to the server, and the server sends back a page or some data.
- A request is that message from your browser to the server. It says what you want to do, for example "show me this poll" or "record my vote".
- A parameter is a named piece of information inside a request. Think of a form on paper: each field has a label (the name) and a value you write in it. In a request, a parameter is the same idea, a name paired with a value.
- URL encoding is a way of writing characters that are not allowed to appear literally in a request. For example, a space becomes
%20. Square brackets[and]are written as%5Band%5D. Sovote%5B%5Dis justvote[]written in encoded form. - An array parameter is a parameter that can hold a list of values rather than a single one. The square brackets in
vote[]are a common convention that tells the server "this is a list". - A proxy (in this context, an intercepting proxy) is a tool that sits between your browser and the server. It lets you pause a request, look at it, change it, and then let it continue. It is like a postal worker who opens your letter, lets you edit it, and then delivers it.
- A vote identifier (or
vote_id) is the number the application uses internally to refer to one specific option in a poll. When you click an option, your browser sends the number of that option to the server. - An invalid identifier is a number that does not match any real option in the poll. The server has no option with that number, so it cannot be a genuine vote.
Setting up
To reproduce the issue you need two accounts:
user1, the person who creates the poll.user2, the person who should not see the results until they have voted.
You also need an intercepting proxy, because the whole trick depends on editing the vote request while it is on its way to the server. The report does not mention a specific Phabricator version.
Finding the problem
The researcher looked at the Slowvote poll feature and at the setting that hides results until you vote. The key observation was that a vote naming an option that does not exist still unlocked the results.
That difference matters. In the reported case, a request naming an option that does not exist was enough to unlock the results. If the check were "did this user send a vote for one of the options in this poll?", the fake vote would be rejected.
Exploitation
Step 1: Create a restricted poll
As user1, create a poll in Slowvote. Make it visible to anyone, and switch on the option labelled "Require a vote to see the responses".
Why this step: it sets up exactly the situation we want to test. The results should only be shown to people who have voted.
Step 2: Confirm the restriction
As user2, open the poll. Because user2 has not voted, the actual results are not shown.
Why this step: it proves the restriction is really active for this account. Without this check, you would not know whether the results were hidden because of the setting or for some other reason.
Step 3: Vote with interception
As user2, pick one of the options and submit the vote, but have your proxy pause the request before it reaches the server.
Why this step: you need a real vote request to start from, so that you can see its shape and then change one small part of it. Intercepting it means the server has not yet seen anything, so you are free to edit.
The vote travels in a parameter named vote%5B%5D, which is the encoded form of vote[]. The parameter is named vote%5B%5D, the encoded form of vote[].
Step 4: Replace the vote with an invalid identifier
Change the vote%5B%5D parameter so that it contains an illegal vote_id. The report notes that a large number is usually enough.
Line by line, in plain words:
vote%5B%5Dis the name of the parameter, the same one the real vote used. The%5Band%5Dare just the encoded square brackets, so the server reads this asvote[].=separates the name from the value.<large number>is the value you put in. It stands for a number that is very unlikely to match any real option in the poll. The report does not give a specific number; it only says a large one is usually enough.
The value no longer points at any real option. Then you let the request continue to the server.
Step 5: Observe the results
After the modified request is processed, user2 can see the poll's results, even though no real vote was cast. The results became visible even though no real vote was cast.
Why this matters: the whole point of the setting was that results stay hidden until you vote. Here the results are visible to someone who did not vote for anything.
Root cause
The report's mitigation section says the likely cause directly: the application should verify that the user is actually voting for a valid option. An invalid vote identifier was enough to unlock the results in the reported case. An invalid submission is therefore enough to unlock the results.
Impact
An unauthorised user can see poll results without making a vote, defeating the requirement set by an administrator that a vote be cast first.
Fix
The report recommends verifying that the user is actually voting for a valid option.
Variants to test
Once you understand the pattern, there are several nearby things worth trying. Each of these is a variation on the same idea: does the application check that the vote is real, or only that something was sent?
- Submit an array containing both a valid and an invalid identifier, for example a real option plus a large number, and check whether the results unlock while the recorded vote is unaffected.
- Submit an empty array or a missing
vote[]parameter and see whether the visibility check still passes. - Submit an identifier belonging to a different poll and check whether it is accepted.
- Submit a non-numeric value in
vote[]and observe whether it is rejected or treated as a vote. - On other applications with "vote to see results" style gates, look for the same pattern: a visibility decision based on the presence of a submission rather than on validation of its contents.
A positive result in each case is that the results become visible without a legitimate vote being recorded.
Hunting notes
This kind of bug hides in features that gate content on a user action, such as voting, rating or completing a step. The signal during recon is a setting that ties visibility to participation: if the application checks participation separately from the validity of the action, an invalid submission may satisfy the check. The researcher showed the results were visible to an account that had not voted, which the poll creator's setting was meant to prevent.
Difficulty
The bypass needs only a proxy and a single parameter edit, with no chaining or deep code analysis, which makes it a beginner-level exercise.
Glossary
- Web application: a program that runs on a server and that you use through your browser.
- Request: the message your browser sends to a server when you do something, such as clicking a button or submitting a form.
- Parameter: a named piece of information inside a request, like a field on a form with a label and a value.
- URL encoding: a way of writing characters that are not allowed literally in a request, for example
%5Bfor[and%5Dfor]. - Array parameter: a parameter that holds a list of values rather than a single one, often written with square brackets such as
vote[]. - Proxy (intercepting proxy): a tool that sits between your browser and the server and lets you pause, inspect and edit requests before they are delivered.
- Vote identifier (
vote_id): the number the application uses internally to refer to one specific option in a poll. - Invalid identifier: a number that does not match any real option in the poll.
- Slowvote: the Phabricator application for creating polls and asking questions.
- Phabricator: a suite of web applications for software development.
- Visibility check: the part of the application that decides whether a user is allowed to see the poll results.
- Root cause: the underlying reason the bug exists, as opposed to the visible symptom.
- Severity: a rating of how serious a security issue is.
- Bounty: a payment made to a researcher for reporting a valid security issue.
- Recon: the exploratory phase of security testing, where you look at how a feature behaves before trying to break it.
- Variant: a nearby variation of the same bug, worth testing to see whether the same weakness appears in other forms.