Non-premium user can disable Ads in japanese version of dic.pixiv.net
The API endpoint for updating user settings did not check whether a user had a premium subscription, so any authenticated user could turn off ads. An attacker could use this to get an ad-free experience without paying, reducing ad revenue and undermining the premium offering.
Originally disclosed on HackerOne
- Disclosed after 11 months
Summary by the program
Summary
A vulnerability is identified in the Japanese version of the pixiv dictionary website (dic.pixiv.net) where non-premium users can disable advertisements. Normally, the ability to disable ads is restricted to premium users only, as indicated by the "P" icon next to the ad display settings in the user profile. However, due to improper access control at the API endpoint /_api/update_user_setting, any authenticated user can modify their ad display preferences without verification of premium status.
Steps to Reproduce
-
Disable any ad-blocker plugins in your browser and login as a non-premium Pixiv user
-
Browse to
https://dic.pixiv.net(the Japanese version that doesn't have /en in the URL) and observe ads being displayed normally -
Intercept any request to
dic.pixiv.netthat includes your cookies -
Modify the request by:
- Changing the HTTP method to POST
- Setting the target URL to
/_api/update_user_setting - Including the following JSON data in the request body:
{"setting":{"showAds":false,"showNewUI":true}} - Note: No need to worry about the Content-Type header, as the server does not validate it
-
Send the request - the response should be
{"success":true} -
Go to your profile at
https://dic.pixiv.net/mypageand verify that "表示しない" (Do not display ads) is now selected despite not being a premium user -
Browse the site to confirm that ads are no longer displayed
Impact
The vulnerability allows non-premium users to access a feature that should be restricted to paying customers only. This can result in:
- Lost revenue from reduced ad impressions when non-premium users disable advertisements
- Devaluation of the premium subscription offering, as one of its key benefits (ad-free browsing) can be obtained for free
- Potential widespread exploitation if knowledge of this vulnerability spreads among users
Context
The pixiv dictionary, dic.pixiv.net, is a dictionary site operated by pixiv. The Japanese version of the site, the one served without /en in the URL, displays advertisements to users. Premium subscribers have the option to turn those ads off, and the user profile marks that option with a "P" icon to show it is a premium-only setting.
The report concerns the API endpoint /_api/update_user_setting, which stores a user's display preferences. The claim is that this endpoint does not check whether the caller is a premium subscriber, so any authenticated user can set the ad preference to off.
Setup
To reproduce the issue you need:
- A logged-in pixiv account that is not a premium subscriber.
- A browser with ad-blocker plugins disabled, so that ads are actually visible.
- A proxy or interception tool that can capture a request to
dic.pixiv.netcarrying your session cookies and replay it with a modified method, path and body.
No special role, version or configuration is mentioned beyond this.
Finding it
The ad display setting in the profile is presented as a premium benefit, indicated by the "P" icon next to it. The setting is saved through /_api/update_user_setting, and this endpoint accepts the ad preference from any authenticated session. In other words, the restriction is enforced in the interface, not at the API that actually writes the preference. That mismatch between what the UI offers and what the API accepts is what made the behaviour look wrong.
Exploitation
Step 1: Confirm ads are shown
Disable any ad-blocker plugins in the browser and log in as a non-premium pixiv user. Browse to:
https://dic.pixiv.net
This is the Japanese version, without /en in the URL. Ads are displayed normally, which establishes the baseline.
Step 2: Capture a request with cookies
Intercept any request to dic.pixiv.net that includes your cookies. The captured request is only a carrier for the session; its original method, path and body are replaced in the next step.
Step 3: Rewrite the request
Modify the intercepted request as follows:
- Change the HTTP method to
POST. - Set the target URL to
/_api/update_user_setting. - Put the following JSON in the request body:
{"setting":{"showAds":false,"showNewUI":true}}
The setting object carries the preferences to be written. showAds set to false is the ad-disabling preference that should be reserved for premium users; showNewUI set to true is sent alongside it. The report notes that the Content-Type header does not need to be set correctly, because the server does not validate it.
Step 4: Send and read the response
Send the request. The response is:
{"success":true}
Step 5: Verify the setting in the profile
Go to your profile:
https://dic.pixiv.net/mypage
The option "表示しない" (Do not display ads) is now selected, even though the account is not a premium user.
Step 6: Verify the effect on the site
Browse the site again to confirm that ads are no longer displayed.
Root cause
The ad preference is written by /_api/update_user_setting without any verification of premium status. The premium restriction exists only in the profile interface, which shows the "P" icon next to the setting, so a request sent directly to the API bypasses it. The endpoint also does not validate the Content-Type header, which makes the request easy to forge from any intercepted request. The report does not describe the server-side code, so the exact location of the missing check is not stated; the behaviour is consistent with an authorisation check that was implemented in the UI rather than in the API handler.
Impact
A non-premium user can obtain a feature that is meant to be restricted to paying customers. The report lists three consequences:
- Lost revenue from reduced ad impressions when non-premium users disable advertisements.
- Devaluation of the premium subscription, because one of its key benefits, ad-free browsing, can be obtained for free.
- Potential widespread exploitation if knowledge of the vulnerability spreads among users.
The issue affects authenticated non-premium users of the Japanese version of the site; the precondition shown is a valid session. The program rated it high severity and awarded a bounty of 3,000 USD.
Fix
The report does not describe the fix that was applied. The change it implies is to enforce the premium check on the server side, in the handler for /_api/update_user_setting, so that a request setting showAds to false from a non-premium account is rejected regardless of what the interface allows. Validating the Content-Type header would also make the endpoint harder to drive from an arbitrary intercepted request, though it is not a substitute for the authorisation check.
Variants to test
- Other premium-only preferences. Enumerate the fields accepted by a settings endpoint and try setting each premium-gated one directly. A positive result is a
{"success":true}response and the change visible in the profile for a non-premium account. - Other regional versions of the same site. The report specifically concerns the Japanese version without
/en. Try the same request against the localised and international hosts. A positive result is the same ad-free state on a host where the UI does not offer the option. - Content-Type handling. Send the JSON body with a different or absent
Content-Typeon other JSON APIs. A positive result is the server parsing and applying the body anyway, which widens the set of requests an attacker can repurpose. - Method override. Where an endpoint is normally reached with one method, try
POST(as here) or other methods against the same path. A positive result is a state change from a method the UI never uses.
Hunting notes
This kind of bug hides where a paid feature is toggled through a settings or profile API. The signal during recon is a UI element marked as premium, such as the "P" icon here, combined with a request that writes the underlying preference. If the request body names the preference directly, as showAds does, it is worth replaying it from a non-premium account and checking the profile afterwards.
The steps show the API returning {"success":true}, the profile showing "表示しない" selected for a non-premium account, and the site no longer showing ads. That chain, from request to stored state to visible behaviour, is what turns a missing check into an accepted report.
A note on scope: the report is about the Japanese version of dic.pixiv.net; the behaviour of other locales is not covered by it.
What happened, in plain words
pixiv runs a dictionary website at dic.pixiv.net. The Japanese version of that site, the one you reach without /en in the address, shows advertisements to its visitors. People who pay for a premium subscription are allowed to switch those ads off. In the user profile, the ad setting carries a small "P" icon, which is the site's way of saying "this option is for premium members only".
The restriction only exists on the surface. The setting is saved by a piece of the website called an API endpoint, /_api/update_user_setting, and that endpoint does not check whether the person asking is a premium member. So any logged-in user, paying or not, can send the right request and turn ads off for themselves. The program rated the issue high severity and paid a bounty of 3,000 USD.
A few words before we start, because the rest of the article leans on them.
- API: a way for a website's own pages to talk to its servers in the background. Think of a restaurant: the menu and the waiter are the interface you see, and the kitchen is the server. An API is the order slip the waiter passes to the kitchen. You are not supposed to walk into the kitchen yourself, but if the kitchen door is unlocked, nothing stops you.
- Endpoint: one specific address inside that API, the equivalent of one specific dish on the menu.
/_api/update_user_settingis the endpoint that saves a user's display preferences. - Cookie: a small piece of data your browser stores for a website and sends back with every request. After you log in, the site puts a session cookie in your browser, and that cookie is how the server recognises you on the next page load. It works like a wristband at an event: show it at the door and you get in without showing your ticket again.
- Session: the logged-in state that the cookie represents. "Any authenticated user" means anyone who has a valid session, in other words anyone who is logged in.
- Business logic error: a flaw where the software does exactly what it was programmed to do, but the rules of the business (here: only paying members get an ad-free site) are not enforced where it matters. Nothing crashes and no alarm goes off; the program simply allows something it should not.
Context
The pixiv dictionary, dic.pixiv.net, is a dictionary site operated by pixiv. The Japanese version of the site, the one served without /en in the URL, displays advertisements to users. Premium subscribers have the option to turn those ads off, and the user profile marks that option with a "P" icon to show it is a premium-only setting.
The report concerns the API endpoint /_api/update_user_setting, which stores a user's display preferences. The claim is that this endpoint does not check whether the caller is a premium subscriber, so any authenticated user can set the ad preference to off.
In plain terms: the website's pages show you a switch, and the switch is labelled as premium-only. But the switch does not actually flip anything itself. It asks the server to save a preference, and the server does not ask "are you a premium member?" before writing it down. The label is a promise made by the interface, not a rule enforced by the server.
Setup
To reproduce the issue you need:
- A logged-in pixiv account that is not a premium subscriber. This is the whole point: if you were premium, turning ads off would be allowed anyway, and you would learn nothing.
- A browser with ad-blocker plugins disabled, so that ads are actually visible. If an ad blocker were running, you could not tell whether the ads disappeared because of the setting or because of the blocker.
- A proxy or interception tool that can capture a request to
dic.pixiv.netcarrying your session cookies and replay it with a modified method, path and body. A proxy sits between your browser and the website and lets you look at, and edit, the traffic going both ways. Think of it as opening a letter, rewriting part of it, and posting it on.
No special role, version or configuration is mentioned beyond this.
Finding it
The ad display setting in the profile is presented as a premium benefit, indicated by the "P" icon next to it. The researcher noticed that the setting is saved through /_api/update_user_setting, and that this endpoint accepts the ad preference from any authenticated session. In other words, the restriction is enforced in the interface, not at the API that actually writes the preference. That mismatch between what the UI offers and what the API accepts is what made the behaviour look wrong.
Why does this matter? Because anything your browser can send, you can send too. The interface is just a set of pages that build requests for you. If the server trusts those requests without checking who is allowed to make them, then the interface's restrictions are decoration. The request is sent to the endpoint directly rather than through the interface.
Exploitation
Step 1: Confirm ads are shown
Disable any ad-blocker plugins in the browser and log in as a non-premium pixiv user. Browse to:
https://dic.pixiv.net
This is the Japanese version, without /en in the URL. Ads are displayed normally, which establishes the baseline.
Line by line: the address is the plain site, no language suffix. Opening it while logged in and seeing ads tells you two things: the site is showing ads to you right now, and your account is not already in an ad-free state. Without this starting point, you could not later prove that anything changed. A baseline is simply the "before" picture.
Step 2: Capture a request with cookies
Intercept any request to dic.pixiv.net that includes your cookies. The captured request is only a carrier for the session; its original method, path and body are replaced in the next step.
Why any request? Because the only thing you need from it is the cookie, the wristband that proves you are logged in. The rest of the captured request, where it was going and what it was carrying, is thrown away. You are keeping the envelope and the stamp, and writing a new letter inside.
Step 3: Rewrite the request
Modify the intercepted request as follows:
- Change the HTTP method to
POST. - Set the target URL to
/_api/update_user_setting. - Put the following JSON in the request body:
{"setting":{"showAds":false,"showNewUI":true}}
A word on the pieces. The HTTP method is the verb of a request: GET normally means "give me this page", POST normally means "here is some data, store it". Saving a preference is a change, so it is sent as POST. JSON is a common text format for structured data, made of names and values in curly braces, a bit like a very strict shopping list.
Line by line for the body:
- The outer
settingobject is the container for the preferences to be written. Everything inside it is a preference name paired with a value. showAdsset tofalseis the ad-disabling preference. This is the one that should be reserved for premium users. Setting it tofalsemeans "do not show ads".showNewUIset totrueis sent alongside it. The report does not explain what this preference controls; it is simply part of the same request.
The report notes that the Content-Type header does not need to be set correctly, because the server does not validate it. The Content-Type header is a label on the request that tells the server what format the body is in, for example "this is JSON". Normally a server reads that label to know how to parse the body. Here the server parses the body regardless of the label, which makes the request easier to forge: you do not have to get the label right for the trick to work.
Step 4: Send and read the response
Send the request. The response is:
{"success":true}
Line by line: success is the name of the field, and true is its value. The server is saying "done, I saved it". This is the first piece of evidence: the server accepted the change from a non-premium account. Note that a success message only tells you the server did what you asked. It does not tell you whether it should have.
Step 5: Verify the setting in the profile
Go to your profile:
https://dic.pixiv.net/mypage
The option "表示しない" (Do not display ads) is now selected, even though the account is not a premium user.
Why check the profile? Because a success message could be misleading. Looking at the profile shows that the preference was actually stored and is now reflected in the interface. "表示しない" is Japanese for "do not display", so the profile is telling you the ad-free option is on. This is the second piece of evidence: the change is visible where the premium restriction is supposed to live.
Step 6: Verify the effect on the site
Browse the site again to confirm that ads are no longer displayed.
This is the third and strongest piece of evidence. The stored preference has a real, visible effect: the ads are gone. A report that shows request, stored state and visible result in that order is much easier for a program to verify than one that only shows a success message.
Root cause
The ad preference is written by /_api/update_user_setting without any verification of premium status. The premium restriction exists only in the profile interface, which shows the "P" icon next to the setting, so a request sent directly to the API bypasses it. The endpoint also does not validate the Content-Type header, which makes the request easy to forge from any intercepted request. The report does not describe the server-side code, so the exact location of the missing check is not stated; the behaviour is consistent with an authorisation check that was implemented in the UI rather than in the API handler.
Authorisation is the part of a system that decides who is allowed to do what. The everyday comparison: a hotel might print "staff only" on a door, but if the door has no lock, the sign is not a restriction, it is a suggestion. Here the sign is the "P" icon, and the missing lock is the absent check in the endpoint. The fix pattern is always the same: put the check where the action actually happens, on the server, not only where the button is drawn.
Impact
A non-premium user can obtain a feature that is meant to be restricted to paying customers. The report lists three consequences:
- Lost revenue from reduced ad impressions when non-premium users disable advertisements. An ad impression is one showing of an ad to one user; advertisers pay per impression, so fewer impressions means less money.
- Devaluation of the premium subscription, because one of its key benefits, ad-free browsing, can be obtained for free. If the paid benefit is available without paying, fewer people have a reason to pay.
- Potential widespread exploitation if knowledge of the vulnerability spreads among users.
The issue affects authenticated non-premium users of the Japanese version of the site; the precondition shown is a valid session. The program rated it high severity and awarded a bounty of 3,000 USD.
Fix
The change it implies is to enforce the premium check on the server side, in the handler for /_api/update_user_setting, so that a request setting showAds to false from a non-premium account is rejected regardless of what the interface allows. Validating the Content-Type header would also make the endpoint harder to drive from an arbitrary intercepted request, though it is not a substitute for the authorisation check.
In plain words: the lock belongs on the door, not on the sign. Checking the header format is like making the door harder to reach; it helps, but anyone determined enough can still walk up to it. The authorisation check is the lock itself.
Variants to test
These are follow-up ideas in the same spirit, useful if you want to look for similar problems elsewhere.
- Other premium-only preferences. Enumerate the fields accepted by a settings endpoint and try setting each premium-gated one directly. A positive result is a
{"success":true}response and the change visible in the profile for a non-premium account. In other words: if one switch is unprotected, check the switches next to it. - Other regional versions of the same site. The report specifically concerns the Japanese version without
/en. Try the same request against the localised and international hosts. A positive result is the same ad-free state on a host where the UI does not offer the option. - Content-Type handling. Send the JSON body with a different or absent
Content-Typeon other JSON APIs. A positive result is the server parsing and applying the body anyway, which widens the set of requests an attacker can repurpose. - Method override. Where an endpoint is normally reached with one method, try
POST(as here) or other methods against the same path. A positive result is a state change from a method the UI never uses.
Hunting notes
This kind of bug hides where a paid feature is toggled through a settings or profile API. The signal during recon is a UI element marked as premium, such as the "P" icon here, combined with a request that writes the underlying preference. Recon, short for reconnaissance, means the looking-around phase before you try anything: reading pages, watching traffic, noting which requests do what. If the request body names the preference directly, as showAds does, it is worth replaying it from a non-premium account and checking the profile afterwards.
The steps show the API returning {"success":true}, the profile showing "表示しない" selected for a non-premium account, and the site no longer showing ads. That chain, from request to stored state to visible behaviour, is what turns a missing check into an accepted report.
A note on scope: the report is about the Japanese version of dic.pixiv.net; the behaviour of other locales is not covered by it. Scope is the boundary of what a program has agreed to look at, and findings outside it are usually not accepted.
Glossary
- API: a way for a website's pages to exchange data with its servers in the background, separate from the pages you see.
- Endpoint: one specific address within an API that performs one specific action, such as saving a preference.
- Cookie: a small piece of data stored by your browser for a site and sent back with each request, often used to keep you logged in.
- Session: the logged-in state represented by a cookie; an authenticated user is one with a valid session.
- Authenticated user: someone the server recognises as logged in.
- Business logic error: a flaw where the software works as programmed but the intended business rules are not enforced, so something that should be forbidden is allowed.
- HTTP method: the verb of a request, such as
GET(fetch something) orPOST(send data to be stored). - POST: the HTTP method normally used to submit data that changes something on the server.
- JSON: a text format for structured data, made of names and values in curly braces.
- Request body: the part of a request that carries data, as opposed to the address and headers.
- Header: a labelled piece of information attached to a request or response, such as the format of the body.
- Content-Type: the header that states the format of the request body, for example JSON.
- Proxy / interception tool: software that sits between your browser and a website so you can view and edit the traffic.
- Replay: sending a captured request again, possibly modified.
- Authorisation: the part of a system that decides who is allowed to perform which action.
- Premium subscriber: a user who pays for the subscription that includes benefits such as ad-free browsing.
- Ad impression: one showing of an advertisement to one user, which is what advertisers pay for.
- Baseline: the "before" observation you compare later results against.
- Recon: the looking-around phase before testing, where you read pages and watch traffic to understand how a site works.
- Scope: the boundary of what a bug bounty program has agreed to accept findings about.
- Severity: the rating a program gives an issue to express how serious it is.
- Bounty: the money a program pays for a valid report.