<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by 𝐀𝐒𝐔𝐑𝐀 on Medium]]></title>
        <description><![CDATA[Stories by 𝐀𝐒𝐔𝐑𝐀 on Medium]]></description>
        <link>https://medium.com/@divyanksitapara088?source=rss-85e5f245efce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hGkyRus2EZ37gPtmnorNLw.jpeg</url>
            <title>Stories by 𝐀𝐒𝐔𝐑𝐀 on Medium</title>
            <link>https://medium.com/@divyanksitapara088?source=rss-85e5f245efce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:03:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@divyanksitapara088/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Business Logic Vulnerabilities via Unrestricted GraphQL API Mutations Allow Bypass of Platform…]]></title>
            <link>https://medium.com/@divyanksitapara088/business-logic-vulnerabilities-via-unrestricted-graphql-api-mutations-allow-bypass-of-platform-6001dfccd709?source=rss-85e5f245efce------2</link>
            <guid isPermaLink="false">https://medium.com/p/6001dfccd709</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <pubDate>Tue, 01 Sep 2026 12:28:25 GMT</pubDate>
            <atom:updated>2026-09-01T12:28:25.115Z</atom:updated>
            <content:encoded><![CDATA[<h3>Business Logic Vulnerabilities via Unrestricted GraphQL API Mutations Allow Bypass of Platform Restrictions and Logic</h3><p>HHello community 👋,I’m Divyank Sitapara, a Bug Bounty Hunter and Application Security Researcher. I hope you’re all doing well. I’m back with my fourth write-up, where I’ll be sharing a <strong>business logic vulnerability</strong> I recently discovered in an application that uses <strong>GraphQL APIs</strong>.</p><p>I hope you find this write-up useful, informative, and engaging, and that it helps you learn something new. So, stay with me until the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1A5rjXbwurVTRA7E2Sa8PQ.gif" /></figure><p>Before we dive in, I recommend reading my <strong>previous article</strong>, where I discussed an <a href="https://medium.com/@divyanksitapara088/exploiting-csrf-in-graphql-apis-achieving-unauthorized-crud-operations-bounty-038522c39a40"><strong>impactful CSRF vulnerability</strong></a> in a GraphQL API. This write-up is partially dependent on that finding, as the business logic issue explained here was identified using the <strong>same GraphQL API behavior</strong>.</p><p>With that context in mind, let’s move forward.</p><p>To understand the overall application logic, the system allows users to <strong>create chats and compose emails</strong> in order to communicate with other users on the platform. At the time of creating a chat or composing an email, a user is allowed to interact with <strong>only one other user</strong> — meaning group chats or adding multiple users to a single conversation is not permitted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ezjb2JOjjYP5-OB5y6vMQQ.png" /><figcaption><strong>One-to-one user messaging restriction</strong></figcaption></figure><p>Additionally, the application <strong>prevents communication with blocked users</strong>. If a user has been blocked by the system, it is not possible to create a chat or compose an email with that user, and no form of interaction is allowed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*BntH2iSmCIOKCfxMf7nlmA.jpeg" /><figcaption><strong>Interaction restrictions with users blocked by the system</strong></figcaption></figure><p>Another important restriction is a <strong>daily communication limit</strong>. Each user is allowed to create or send <strong>only two chats, messages, or emails per day</strong>. If a user attempts to exceed this limit, the application displays a warning message such as:<br> <strong>“You are only allowed to send 2 messages per day. Please try again later.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*RQq0Bk8Eixm4gFP3knKoZA.png" /><figcaption><strong>Time-based message restriction</strong></figcaption></figure><p>If you want to create two or more chats per day and create group chats by adding two or more users, you need to purchase a premium plan. As a free or regular user, you cannot create more than the allowed number of chats or group chats.</p><p>I also observed that once a chat is created, any <strong>message or comment</strong> sent within that chat triggers a <strong>notification</strong> for the other user, which is delivered both within the application and via <strong>email</strong>. This is how the chat and messaging functionality operates, along with several other logic-based restrictions enforced by the application.</p><p>As discussed earlier, the chat and messaging functionality had multiple <strong>security restrictions</strong> in place. My objective was to find a way to <strong>bypass these restrictions at a logical level</strong>, rather than breaking individual controls.</p><p>I was specifically looking for a scenario where the application’s intended logic could be manipulated — <strong>forcing the system to approve an action that should normally be denied</strong>. Exploiting this behavior would result in a <strong>business logic vulnerability</strong>.</p><p>With this approach, I carefully analyzed the <strong>existing restrictions and logic flow</strong> within the chat and messaging functionality. Eventually, I was able to <strong>bypass all the enforced security restrictions and logic checks</strong>.</p><p>Now, I’ll walk you through the <strong>step-by-step process</strong> I followed to identify this vulnerability.</p><h3>Let’s begin🛸.</h3><p>As mentioned earlier, the chat and messaging functionality had multiple security restrictions. To test and potentially bypass these restrictions and logic flows, I created three separate test user accounts, each logged in using a different browser.</p><p>Next, I began testing the chat and messaging functionality. Using <strong>User1’s account</strong>, I created a messaging conversation and added <strong>User2</strong> to it. According to the system’s enforced logic and restrictions, I was <strong>unable to add User3</strong> to the conversation.</p><p>My goal was to bypass the <strong>“only one user allowed per message conversation”</strong> restriction and add <strong>User3</strong> to the same chat. To achieve this, I analyzed various requests related to message creation and attempted different types of <strong>request manipulation and other techniques</strong>. However, despite these efforts, I was <strong>unable to bypass the restriction</strong> — adding more than one user to a conversation was not possible, as the application enforced <strong>strict server-side validation</strong>.</p><p>Since I was <strong>unable to bypass the “one user per conversation” restriction</strong>, I decided to focus on bypassing the other security restrictions. These included limitations such as allowing a user to create or send <strong>only two message conversations per day</strong>, and preventing users from initiating conversations with <strong>system-blocked users</strong> — users who were restricted by the application and could not be interacted with.</p><p>To bypass this type of restriction, I first attempted to create a new message conversation from <strong>User1’s account</strong> and add <strong>User3</strong>, who was blocked by the system. I tried various <strong>techniques and request manipulations</strong>, but it was <strong>not possible to create a conversation with the banned User3</strong>.</p><p>After this, I shifted my focus to bypassing the <strong>time-based restriction</strong>, which limited the number of chats or messages a user could create per day. Since <strong>User1 already had an active chat</strong>, I created another conversation and successfully added <strong>User2</strong>. This new conversation was assigned a <strong>new chat ID</strong>, bringing User1’s total to <strong>two conversations</strong>.</p><p>At this point, any attempt by User1 to create a <strong>third conversation</strong> would trigger the <strong>time-based restriction</strong>, displaying the corresponding error message. As a result, User1 was <strong>unable to create any additional conversations</strong>, having already reached the daily limit of two chats/messages.</p><p>To attempt bypassing this restriction, I tried creating a 3rd message conversation using various techniques, including race condition attacks, rate-limit bypass attempts, and other request manipulations. However, none of these attempts were successful</p><p>Overall, the chat and messaging functionality appeared to be protected by <strong>strong server-side validations</strong>, making direct bypass attempts ineffective. At this stage, I felt quite discouraged. However, this led me to realize that bypassing these restrictions would require a <strong>completely different approach or logic flow</strong> in order to succeed.</p><p>As I mentioned at the beginning, this write-up is closely connected to my <strong>previous article</strong>, where I discussed an impactful <strong>CSRF vulnerability</strong> involving <strong>GraphQL mutations</strong>. During my reconnaissance phase for that research, I discovered an <strong>API documentation PDF</strong> that listed <strong>all GraphQL queries and mutations</strong> used by the system, along with the features and functionalities they supported.</p><p>While reviewing this documentation again, I noticed a particular mutation with the operation name <strong>createMsg</strong>, which immediately caught my attention. This raised several questions in my mind:</p><ul><li>Is this mutation still active?</li><li>If I use this mutation to <strong>create and execute a modified GraphQL API request</strong>, would it help <strong>bypass all existing limitations and restrictions</strong>?</li></ul><p>Additionally, I observed that the application’s <strong>chat and messaging functionality</strong> was hosted on a <strong>separate subdomain</strong> that did <strong>not use GraphQL APIs</strong> at all. Instead, it relied on traditional request–response mechanisms. This led me to suspect that the <strong>GraphQL mutation might have been used previously</strong>, It was possible that GraphQL had been introduced earlier and later replaced, leaving some mutations unused but still accessible.</p><p>With these doubts in mind, I contacted the application’s <strong>support team</strong> through the <em>Contact Us</em> page to better understand the architecture. They responded by explaining that the <strong>chat and messaging functionality was managed by a third-party service</strong>. This clarified why the chat system had <strong>strict validations</strong>, as those controls were enforced externally by the third-party provider.</p><p>I also learned that this third-party chat integration was introduced only <strong>a few years ago</strong>, which further strengthened my suspicion. At this point, I began to wonder whether executing the <strong>GraphQL </strong><strong>createMsg mutation directly</strong>—without triggering backend checks tied to the third-party service—could allow the request to succeed and <strong>bypass all existing restrictions ?.</strong></p><p>This realization became the key turning point in my investigation🚀.</p><p>I then navigated to the <strong>main domain</strong> and captured a request from a feature that specifically used a <strong>GraphQL mutation</strong>. For testing purposes, I chose the <strong>updateBio</strong> feature. After capturing the API request, I replaced the <strong>mutation body</strong> of the updateBio request with the mutation body of <strong>createMsg</strong>.</p><p>The modified request looked something like this :-</p><pre>POST /api/graphql HTTP/2<br>Host: example.com<br>Cookie: cookie and other auth related tokens <br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0<br>Accept: */*<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate, br<br>Referer: https://www.example.com/<br>Content-Type: application/json<br>Content-Length: 178<br>Origin: https://www.example.com<br>Sec-Fetch-Dest: empty<br>Sec-Fetch-Mode: cors<br>Sec-Fetch-Site: same-site<br>Te: trailers<br><br>{&quot;query&quot;:&quot;\n mutation createMsg(\r\n  $to: [Int!]!,\r\n  $title: String!,\r\n  $body: String!\r\n)<br> {\r\n  createMsg(\r\n    to: $to,\r\n    title: $title,\r\n    body: $body\r\n  )<br>  {\r\n    success\r\n  }\r\n}\n    &quot;,<br>&quot;variables&quot;:{<br> &quot;to&quot;:[<br>   9878786<br>],<br>  &quot;title&quot;:&quot;regarding assignment&quot;,<br>  &quot;body&quot;:&quot;hello members&quot;<br>},<br>}</pre><p>I performed these changes using <strong>User1’s account</strong>, even though the <strong>daily limit of two messages</strong> had already been reached, which normally prevented the creation of a third chat. However, in the crafted request, I supplied different values in the <strong>variables</strong> section — specifically, the <strong>user ID of the target user</strong> along with the message content.</p><p>When I sent this crafted request, the result was <strong>unexpected</strong>. The <strong>server and backend executed the operation successfully without performing any of the usual checks</strong>, and I received a <strong>200 OK</strong> response.</p><pre>{&quot;data&quot;: {&quot;createMsg&quot;: {&quot;success&quot;: true}}}</pre><p>After this, I logged into <strong>User1’s account</strong> and navigated to the <strong>chat and messaging subdomain</strong> to verify whether a <strong>third chat or conversation</strong> had actually been created. To my surprise, it had. This confirmed that I had successfully <strong>bypassed the “2 messages per day” restriction</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*OLV5JWx-8KtLL0hX5dRC0A.jpeg" /><figcaption><strong>The time-based restriction was successfully bypassed.</strong></figcaption></figure><p>Even though the chat and messaging subdomain did not directly use <strong>GraphQL APIs</strong>, the backend still processed the request. This demonstrated that one of the core restrictions had already been bypassed.</p><p>My next objective was to bypass the <strong>remaining restrictions</strong>. I continued testing using the same approach. Upon inspecting the request body, I noticed that the <strong>to variable</strong> accepted an <strong>array of values</strong>, meaning multiple user IDs could be supplied at once. This opened the possibility of adding <strong>multiple users to a single chat</strong>.</p><p>I modified the request by adding <strong>User2 (userId: 5678)</strong> and <strong>User3 (userId: 0933)</strong> — even though User3 was <strong>system-blocked</strong> — into the to array, for example:</p><pre>&quot;to&quot;: [5678, 0933, otherUserId]</pre><p>I then sent this modified GraphQL request and received another <strong>200 OK</strong> response. When I immediately checked <strong>User1’s account</strong>, I confirmed that a <strong>new chat had been created</strong> with a new chat ID, containing <strong>three users</strong>: User1, User2, and User3.</p><p>This meant that:</p><ul><li>The restriction allowing <strong>only one user per chat</strong> was bypassed</li><li>The restriction preventing interaction with a <strong>system-blocked user</strong> was bypassed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*V_In9mk8bK5duPMFpuKABA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*FH1ncAEAbHvEDYyWsh5TZg.jpeg" /><figcaption><strong>The restriction allowing only one user per chat was bypassed. Furthermore, this bypass made it possible to interact with system-blocked users.</strong></figcaption></figure><p>Ultimately, due to the <strong>unrestricted GraphQL mutation</strong>, all chat and messaging security restrictions were successfully bypassed. This allowed me to break the application’s intended <strong>logic flow</strong>, confirming the presence of a <strong>critical business logic vulnerability</strong>.</p><p>As I mentioned earlier, whenever a chat or message is created, the system generates a <strong>notification</strong> for the recipient. This notification appears both in the recipient’s <strong>account</strong> and in their <strong>email inbox</strong>, informing them that a particular user has sent a message.</p><p>Keeping this functionality in mind, I decided to test a race condition scenario. I sent the modified GraphQL API request to Burp Repeater approximately 20 times. After that, I grouped all 20 requests together and executed them in parallel.</p><p>The result was quite interesting⚡. For each user ID supplied in the variables, the recipient received <strong>around 20 notification emails simultaneously</strong>, clearly demonstrating a <strong>notification flooding attack</strong>. This confirmed that there were <strong>no rate-limiting or race-condition protections</strong> applied to this GraphQL mutation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*ORoRHoueiOsbBnHJVnk9ew.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*sPFVCYMP1Oh8TC5sap29CQ.jpeg" /><figcaption><strong>Race-Condition Example</strong></figcaption></figure><p>As a result, both <strong>User1 (sender)</strong> and <strong>User2 (receiver)</strong> ended up with <strong>approximately 20 chat messages and conversations created at once</strong>, further amplifying the impact of the vulnerability.</p><p>Using this approach, I was able to <strong>bypass the platform’s entire logic flow</strong>. I documented the issue in detail and responsibly reported it to the <strong>technical team</strong>. As a result of this disclosure, I was <strong>rewarded with a</strong>💸<strong> bounty</strong>, which made the effort truly worthwhile.</p><p>I hope you found this write-up helpful and learned something valuable. If you enjoyed it, please clap 👏, share , and follow me for more security write-ups.</p><p>See you in the next write-up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6001dfccd709" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting CSRF in GraphQL APIs: Achieving Unauthorized CRUD Operations ( $$$ Bounty )]]></title>
            <link>https://medium.com/@divyanksitapara088/exploiting-csrf-in-graphql-apis-achieving-unauthorized-crud-operations-bounty-038522c39a40?source=rss-85e5f245efce------2</link>
            <guid isPermaLink="false">https://medium.com/p/038522c39a40</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[information-security]]></category>
            <pubDate>Sat, 15 Aug 2026 06:42:12 GMT</pubDate>
            <atom:updated>2026-08-15T06:42:12.673Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Community👋, I’m Divyank Sitapara, an Application Security Researcher and Bug Bounty Hunter. This is my 3rd<strong> </strong>write-up, where I’ll share an interesting and impactful vulnerability I recently discovered within an API ,In this article, I explain the vulnerability in detail — how it works and why it matters. I hope you find it helpful, informative, and learn something new from it.</p><p>So, I encourage you to stay with me until the end.<br> Let’s get started.</p><p>The application I was testing made extensive use of GraphQL APIs. So, before diving into the vulnerability, let’s first understand <strong>what a </strong>GraphQL<strong> </strong>API is, how it works, and <strong>where it is commonly used.</strong></p><p>With that in mind, let’s get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GrSa3jcwoA9GJWYzOcYckQ.gif" /></figure><h3>What Is GraphQL🌐?</h3><p>So, what exactly is GraphQL?</p><p>GraphQL is not a database, but a query language for APIs and a runtime to<strong> </strong>execute those queries using existing data. It allows applications to <strong>request </strong>and modify data from a backend in a flexible and efficient way.</p><p>Unlike REST APIs, which use multiple endpoints with fixed responses, GraphQL has a <strong>single endpoint</strong> and lets clients request <strong>only the data they need</strong>, avoiding over-fetching or under-fetching.</p><p>GraphQL is <strong>strongly typed</strong> — all data types, relationships, and fields are clearly defined in the schema. It supports <strong>introspection</strong>, so clients can explore the API structure. Its <strong>hierarchical structure</strong> ensures that the response exactly matches the request, making it predictable and easy for frontend applications to use.</p><h3>GraphQL Queries and Mutations:</h3><p>A<strong> </strong>GraphQL API<strong> </strong>uses queries and mutations to fetch and modify data between the client and server.</p><ul><li><strong>Queries</strong> read data without changing the server’s state and allow the client to request only the fields it needs.</li><li><strong>Mutations</strong> create, update, or delete data, modifying the server’s state for actions like creating records or updating user information.</li></ul><p>With this understanding of how GraphQL APIs work, let’s move on to the <strong>vulnerability identified</strong> in the API.</p><h3>Let’s dive in🔎.</h3><p>As I mentioned earlier, the application I was testing made extensive use of GraphQL APIs. I noticed that the GraphQL endpoint was being called using paths such as <strong>/api/graphql</strong> and <strong>/graphql</strong>. The application relied on GraphQL queries to fetch normal data, while GraphQL mutations were used to perform CRUD operations related to various features and functionalities.</p><p>Key application features — such as <strong>comments, collection management, profile data, user preferences, CRUD operations through the API</strong>, and many other application functions — were all handled through <strong>GraphQL mutations</strong> in the request body. I tested multiple functions and features that heavily depended on GraphQL mutations.</p><p>During testing, I attempted to identify common GraphQL exploitation scenarios, including <strong>IDOR</strong>, <strong>Access Control Related Issue</strong>, and other <strong>injection-related vulnerabilities</strong>. However, due to <strong>strict validation</strong>, I was initially unsuccessful in finding any exploitable issues.</p><p>After that, I revisited the Burp Suite history and reviewed the requests I had previously interacted with. While analyzing those requests, I noticed something interesting and unexpected⚡. I decided to dig deeper into it, and that’s where I finally achieved success.</p><p>So, let’s move on to the actual issue🚀.</p><p>While reviewing the Burp Suite history, I focused on analyzing requests that specifically used the <strong>GraphQL API</strong>, including both <strong>queries and mutations</strong>. During this analysis, I observed that the requests sent to the GraphQL endpoint <strong>did not include any CSRF token implementation</strong>, either in the request headers or in the request body.</p><p>Additionally, I noticed that the responses to the GraphQL requests had the <strong>SameSite cookie attribute set to </strong><strong>None</strong> (SameSite=None).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*qfbi3bXjUgOF7qbeXNogBQ.png" /><figcaption><strong>cookie attribute</strong></figcaption></figure><p>This immediately 💡caught my attention and led me to consider the possibility of a <strong>CSRF exploitation</strong>, especially for features and functionalities that relied on <strong>GraphQL mutations</strong> to perform <strong>CRUD operations</strong>.</p><p>With this in mind, I decided to move forward and test this potential attack scenario.</p><p>Additionally, during my <strong>reconnaissance phase</strong>, I discovered an <strong>API documentation PDF</strong> that contained a complete list of <strong>GraphQL queries and mutations</strong> used across the application. The document clearly mapped which queries and mutations were associated with specific <strong>features and functionalities</strong>.</p><p>If GraphQL introspection is enabled, you can also understand the complete <strong>GraphQL schema</strong>, including which types, mutations, queries, objects, and other operations are implemented in the application.</p><p>This documentation significantly increased my <strong>attack surface visibility</strong> and helped me better understand the potential <strong>impact</strong>, as it allowed me to identify exactly which features could be targeted and how they were implemented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*otzBYFSb0v-D9Me3fKxM9g.gif" /><figcaption><strong>After seeing the PDF documentation, my reaction was something like this.</strong></figcaption></figure><p>To perform the <strong>CSRF attack</strong>, I chose a feature that relied heavily on a GraphQL mutation. For testing purposes, I captured a profile update request used to modify the user’s <strong>bio</strong> field and sent this request to <strong>Burp Repeater</strong>.</p><p>The request body was sent in <strong>JSON format</strong>, and it looked similar to the following structure.</p><pre>{<br>  &quot;query&quot;:&quot;\n    mutation UpdateAboutMe($about: String!, $userId: ID) <br>     {\n  updateAboutMe(about: $about, userId: $userId) <br>      {\n    success\n  }\n}\n    &quot;,<br>&quot;variables&quot;:{<br>&quot;about&quot;:&quot;# hello worlds&quot;<br>},<br>    &quot;operationName&quot;:&quot;UpdateAboutMe&quot;<br>}</pre><p>As mentioned earlier, the request body used the Content-Type: application/json. <strong>This led me to question whether performing a CSRF attack would be possible in this scenario?,</strong> <strong>since JSON bodies are generally safer from CSRF vulnerabilities because browsers do not automatically send cross-origin JSON requests</strong>.</p><p>However, this also sparked another idea💡 and a potential alternative approach in my mind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*TGAuFOpT26iw5Tl3suWdrg.gif" /></figure><p>In the captured <strong>update bio request</strong>, I changed the <strong>Content-Type</strong> header from <strong>application/json</strong> to <strong>application/x-www-form-urlencoded</strong>. After that, I modified the request body accordingly, converting the original JSON structure into a format that matched the <strong>application/x-www-form-urlencoded</strong> content type.</p><p>The modified request body looked something like this :-</p><pre>query=mutation UpdateAboutMe($about: String!, $userId: ID) {<br>  updateAboutMe(about: $about, userId: $userId) {<br>    success<br>  }<br>}&amp;variables={&quot;about&quot;:&quot;# hello worlds&quot;}</pre><p>Once the request body was successfully transformed into the <strong>application/x-www-form-urlencoded</strong> format, it became clear that there was also a <strong>content-type–related misconfiguration</strong> 🔥. The server accepted this modified request body without any issues⚡.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*5pDvwjCxdZePcXnsfYkj7Q.png" /><figcaption><strong>Due to improper handling of the </strong><strong>Content-Type header, the server accepted requests with multiple content types.</strong></figcaption></figure><p>After making this change, I URL-encoded all characters in the request body — including the query and variables parameter values—using Burp Suite. This ensures that the browser can correctly parse and transmit the request, as GraphQL queries often contain special characters (such as {}, &quot;, :, and spaces) that may otherwise be interpreted incorrectly during transmission. I then quickly generated a csrf.html PoC file with Burp&#39;s help and opened it in the same browser where the user was already logged in to the application.</p><p>What happened next was truly unexpected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*rkKBjOL5IuDHTmytLKLDNQ.png" /></figure><p>After encountering this error, I was unable🥲 to successfully execute the <strong>CSRF attack</strong> on my first attempt. I then continued working on bypassing this restriction and started exploring alternative approaches.</p><p>Eventually, a technique came to mind that involved <strong>changing the HTTP method type</strong>. I went back to the original request and applied an additional modification. Since <strong>GraphQL mutations are typically performed using the </strong><strong>POST method</strong>, I changed the request method from <strong>POST to </strong><strong>GET</strong>.</p><p>After making this change, the final request looked something like this.</p><pre>example.com/api/graphql?query=%6d%75%74%61%74%69%6f%6e%20%55%70%64%61%74%65%41%62%6f%75%74%4d%65%28%24%61%62%6f%75%74%3a%20%53%74%72%69%6e%67%21%2c%20%24%75%73%65%72%49%64%3a%20%49%44%29%20%7b%0d%0a%20%20%75%70%64%61%74%65%41%62%6f%75%74%4d%65%28%61%62%6f%75%74%3a%20%24%61%62%6f%75%74%2c%20%75%73%65%72%49%64%3a%20%24%75%73%65%72%49%64%29%20%7b%0d%0a%20%20%20%20%73%75%63%63%65%73%73%0d%0a%20%20%7d%0d%0a%7d&amp;variables=%7b%22%61%62%6f%75%74%22%3a%22%23%20%68%65%6c%6c%6f%20%77%6f%72%6c%64%73%22%7d</pre><p>After making these changes, I generated a <strong>final HTML CSRF POC </strong>using Burp Suite. I then opened this PoC file in the <strong>same browser where the application was already running in an authenticated session</strong>.</p><p>And boom⚡ — <strong>The CSRF exploitation was successful</strong>.</p><p>The behavior indicated that the server handled authorization, authentication differently based on the <strong>HTTP method</strong>. Changing the request from POST to GET bypassed the expected check and allowed the payload to execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*IwxJq6P3Qtp8KrrhsIsuCg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*mFb8vztIBoTX2xyVp4_q6w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*_yAbhYcN-8u_hMnH9AFLTw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*yQ8bDJfAkfZeZaiIVhGLEQ.png" /></figure><p>So, in the above screenshot, I wanted to demonstrate that as an <strong>attacker</strong>, I could perform <strong>CSRF exploitation</strong> on <strong>any feature or functionality</strong> within the application. This allowed me to execute <strong>CRUD operations</strong>, particularly on features and functions that relied on <strong>GraphQL mutations</strong>.</p><p>Thus, due to the <strong>GraphQL API and other misconfigurations</strong>, all components of the system that relied on <strong>GraphQL mutations</strong> for <strong>CRUD operations</strong> were vulnerable. This meant that a wide range of functions and features could be affected, potentially causing significant damage to the system.</p><p>If an attacker had exploited this vulnerability to manipulate multiple functionalities at once, it could have severely impacted the system’s <strong>integrity, availability, and confidentiality</strong>. I responsibly reported this issue to the system’s technical team, and as a result of disclosing this vulnerability, I was awarded a <strong>bounty</strong>💸.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wVO8ZzVE0xNwFNt2PzYIFA.png" /></figure><p>I hope you were able to<strong> </strong>learn something valuable from this write-up. If you found it useful or interesting, please don’t forget to <strong>share it</strong>, <strong>give it a clap</strong>👏, and <strong>follow me</strong> for upcoming write-ups.</p><p>Let’s meet again in the next article!</p><p>Follow On : <a href="https://www.linkedin.com/posts/divyank-sitapara-b0a369307_csrfvulnerability-graphqlexploitation-apisecurity-share-7493554458799439872-eKJJ/?utm_source=social_share_send&amp;utm_medium=android_app&amp;rcm=ACoAAE4vfPoBn465Cz9RDlQe_Ag7KXhjVvfitRE&amp;utm_campaign=copy_link">linkedin.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=038522c39a40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interesting OTP Validation Logic  Flaw: Registering Any Victim’s Email Without Inbox Access …]]></title>
            <link>https://medium.com/@divyanksitapara088/interesting-otp-validation-logic-flaw-registering-any-victims-email-without-inbox-access-90f7ec989b1e?source=rss-85e5f245efce------2</link>
            <guid isPermaLink="false">https://medium.com/p/90f7ec989b1e</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <pubDate>Wed, 10 Sep 2025 04:53:47 GMT</pubDate>
            <atom:updated>2025-12-13T04:39:02.717Z</atom:updated>
            <content:encoded><![CDATA[<h3>Interesting OTP Validation Logic 🥷 Flaw: Registering Any Victim’s Email Without Inbox Access 🔑 Using Wrong OTP to Bypass Email/OTP Verification</h3><p>Hello Community👋, My name is Divyank Sitapara , a security researcher &amp; Bug Bounty Hunter. I hope you all are doing well. This is my second write-up, where I’ll share one of the interesting bugs I discovered a few months ago, During my testing on a platform, I identified a logical flaw in the email verification and OTP validation flow. This issue allowed me to bypass the intended security mechanism, and as a result, I was awarded a bounty💸 for responsibly reporting it, In this write-up, I’ll explain in detail how I discovered the vulnerability, the step-by-step reproduction process, and the overall impact. So, stay with me till the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zitMtI__KM0VI_L9ukc8Ow.jpeg" /><figcaption><strong>Improper Authentication</strong></figcaption></figure><blockquote><strong>Category:- CWE-287: Improper Authentication + CWE-840: Business Logic Error<br>Severity: Medium (P3)</strong></blockquote><p><strong>The normal registration flow of the application was something like this:</strong></p><p>Navigate to the registration page → Enter your email address → A 4-digit OTP is sent to the provided email → Enter the OTP on the second page to verify the email → After successful OTP verification, proceed to the third page to set a username and password → Once credentials are created, access to the account is granted.</p><h4>My Test Case:</h4><p>As part of my testing, I entered my own email address on the registration page and received a 4-digit OTP in my inbox. I entered the OTP on the second page, clicked “Verify Email”, and captured the request using Burp Proxy.</p><p>When analyzing the OTP request, I noticed that the request body did not contain any parameter for the email address. This indicated that the application was not verifying which email the OTP actually belonged to. Instead, the validation was only dependent on the active session and tokens. I noted this behavior for further investigation.</p><pre>POST /registration/verify HTTP/2<br>Host: user.example.com<br>Cookie:  .<br>         .<br>         . ## Session tokens and Others Cookies <br>         .<br>         .<br><br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0<br>Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, /; q=0.01<br>Accept-Language: en-US,en;q=0.5<br>Accept-Encoding: gzip, deflate, br<br>Referer: https://user.example.com/registration/verify<br>Content-Type: application/x-www-form-urlencoded; charset=UTF-8<br>X-Requested-With: XMLHttpRequest<br>X-Csrf-Token: SaomsCSCSA835adaeeEn4yfgIrE1PTFnrAnEHRFS3SM0ukdjVz6JTRB2LHPZSnhMwWafh3e83453cebsa<br>Content-Length: 169<br>Origin: https://user.example.com<br>Sec-Fetch-Dest: empty<br>Sec-Fetch-Mode: cors<br>Sec-Fetch-Site: same-origin<br>Te: trailers<br><br>authenticity_token=SaomsCSCSA835adaeeEn4yfgIrE1PTFnrAnEHRFS3SM0ukdjVz6JTRB2LHPZSnhMwWafh3e83453cebsa&amp;code1=1&amp;code2=8&amp;code3=5&amp;code4=1&amp;code=1851&amp;commit=Verify email</pre><p>Next, I analyzed the response of a valid OTP request. The response contained two important headers and a redirect script that redirected users to the sign-up page upon successful verification:</p><pre>## Valid OTP Response<br><br>HTTP/2 200 OK<br>Date: Fri, 1 Aug 2025 07:56:59 GMT<br>Content-Type: text/javascript; charset=utf-8<br>Location: https://user.example.com/auth/sign_up<br>Cache-Control: no-store<br>Content-Security-Policy: default-src &#39;self&#39; https:; font-src &#39;self&#39; https: data:; img-src &#39;self&#39; https: data:; object-src &#39;none&#39;; script-src &#39;self&#39; https: &#39;unsafe-inline&#39;; style-src &#39;self&#39; https: &#39;unsafe-inline&#39;; frame-ancestors &#39;self&#39; https: https://next.example.com<br>Etag: W/&quot;9db3206f14e758ac3a8f209d7e1b46c2&quot;<br>Pragma: no-cache<br>Referrer-Policy: strict-origin-when-cross-origin<br>Set-Cookie: xxx_session=7fb41dce902a3b6e5c0d19f27aa8e54c; domain=.example.com; path=/; expires=Mon, 10 Aug 2025 07:56:59 GMT; secure; HttpOnly; SameSite=Lax<br>Set-Cookie: xxx_session_refresh=; path=/; max-age=0; expires=Thu,00:00:00 GMT; SameSite=Lax; secure; HttpOnly<br>Strict-Transport-Security: max-age=31536000; includeSubDomains<br>Vary: Origin<br>X-Content-Type-Options: nosniff<br>X-Download-Options: noopen<br>X-Frame-Options: SAMEORIGIN<br>X-Permitted-Cross-Domain-Policies: none<br>X-Request-Id: 51eac97f08329de46f0b34a2cd19b87a<br>X-Runtime: 0.023491<br>X-Xhr-Redirect: https://user.example.com/auth/sign_up<br>X-Xss-Protection: 1; mode=block<br>Cf-Cache-Status: DYNAMIC<br>Server: cloudflare<br>Cf-Ray: 1507d0e47b194652-BOM<br><br>Turbolinks.clearCache()<br>Turbolinks.visit(&quot;https://user.example.com/auth/sign_up&quot;, {&quot;action&quot;:&quot;advance&quot;})</pre><pre>1:- Location: https://user.example.com/auth/sign_up<br><br>2:- X-Xhr-Redirect: https://user.example.com/auth/sign_up</pre><p>The script looked like this:</p><pre>Turbolinks.clearCache();<br>Turbolinks.visit(&quot;https://user.example.com/auth/sign_up&quot;, {&quot;action&quot;:&quot;advance&quot;});</pre><p>I saved these values for later use😁.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*otzBYFSb0v-D9Me3fKxM9g.gif" /></figure><p>To exploit the logic flaw, I dropped the response of the valid OTP request and refreshed the browser. After the refresh, the application redirected me back to the registration page. This time, instead of my own email, I entered the victim’s email address (to which I had no access). Since I did not have access to the victim’s mailbox, <strong>I simply used a random 4-digit OTP (e.g., 1111)</strong> and intercepted this request.</p><p>While analyzing the response of this invalid OTP request,<strong> I noticed that the request was still using the same cookies and session tokens from my previously valid OTP session,</strong> <strong>even though I had entered a different email address. Normally</strong>, when a wrong OTP is entered, the application redirects back to the first page and asks the user to re-enter the email and validate the OTP again — but here I modified the response.</p><pre>## Wrong OTP Response<br><br>HTTP/2 200 OK<br>Date: Fri, 1 Aug 2025 07:56:59 GMT<br>Content-Type: text/javascript; charset=utf-8<br>Location: https://user.example.com/registration/verfiy<br>Cache-Control: no-store<br>Content-Security-Policy: default-src &#39;self&#39; https:; font-src &#39;self&#39; https: data:; img-src &#39;self&#39; https: data:; object-src &#39;none&#39;; script-src &#39;self&#39; https: &#39;unsafe-inline&#39;; style-src &#39;self&#39; https: &#39;unsafe-inline&#39;; frame-ancestors &#39;self&#39; https: https://next.example.com<br>Etag: W/&quot;9db3206f14e758ac3a8f209d7e1b46c2&quot;<br>Pragma: no-cache<br>Referrer-Policy: strict-origin-when-cross-origin<br>Set-Cookie: xxx_session=7fb41dce902a3b6e5c0d19f27aa8e54c; domain=.example.com; path=/; expires=Mon, 10 Aug 2025 07:56:59 GMT; secure; HttpOnly; SameSite=Lax<br>Set-Cookie: xxx_session_refresh=; path=/; max-age=0; expires=Thu,00:00:00 GMT; SameSite=Lax; secure; HttpOnly<br>Strict-Transport-Security: max-age=31536000; includeSubDomains<br>Vary: Origin<br>X-Content-Type-Options: nosniff<br>X-Download-Options: noopen<br>X-Frame-Options: SAMEORIGIN<br>X-Permitted-Cross-Domain-Policies: none<br>X-Request-Id: c138e0a47fd26b93a50c79d1ee42fa69<br>X-Runtime: 0.023491<br>X-Xhr-Redirect: https://user.example.com/registration/verfiy<br>X-Xss-Protection: 1; mode=block<br>Cf-Cache-Status: DYNAMIC<br>Server: cloudflare<br>Cf-Ray: 1507d0e47b194652-BOM<br><br>Turbolinks.clearCache()<br>Turbolinks.visit(&quot;https://user.example.com/registration/verfiy&quot;, {&quot;action&quot;:&quot;replace&quot;})<br></pre><p>I replaced the two redirect headers and the redirect script in the invalid OTP response with the ones from the valid OTP response. After forwarding this modified response, the browser redirected me to the username and password setup page.</p><p>Although a pop-up appeared saying <strong>“Invalid verification code, please try again”</strong>, I ignored it, completed the username/password setup, clicked “Create Account”, and was redirected to the account settings page to set up 2FA. I successfully completed the setup using my mobile device.</p><p><strong>Note: </strong>Normally, if a wrong OTP is entered during registration, the application redirects back to the second page and asks the user to re-enter the correct OTP. But if an attacker exploits this logic flaw, they get redirected straight to the third page, where the application allows them to set a username and password. On that third page, a message still appears saying the OTP was invalid — meaning the Backend / Server is checking the OTP after the redirection.<strong> It’s like the Backend / Server is saying: “Sorry 😔 I checked the OTP a bit too late.” </strong>😆</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*xFkWr724OcgepMsrXEg0Tw.png" /><figcaption><strong>Normal Validation Flow</strong></figcaption></figure><p><strong>Key Observation</strong>👀<strong>:</strong></p><p><strong>I also noted another important point: </strong>if you first enter the victim’s email and submit a wrong OTP, then try to convert that response into a valid OTP response and forward it, the attack does not work — the application still asks for the correct OTP. However, if you first enter your own email as an attacker, capture and drop the request/response of the OTP you receive, then refresh the browser and enter the victim’s email, and only then use this logic flow, the vulnerability can be exploited successfully. In other words, the bypass works only in this sequence and not by simply modifying a wrong OTP response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*owpJXOk63K5le46gGc3LeQ.png" /><figcaption><strong>Logic Flaw On OTP Validation</strong></figcaption></figure><p>Thus, I was able to register an account using the victim’s email without access to their inbox or the actual OTP. The victim remained completely unaware, while an attacker could silently abuse this OTP validation logic flaw to create and control accounts with arbitrary email addresses.</p><h4>🌱 Root Cause of the Vulnerability:</h4><p>This vulnerability exists due to improper binding between the OTP, the email address it was generated for, and the server-side session that handles the registration process. During user registration, when an OTP is requested, it is tied only to the active session via a session cookie and authenticity token — not directly or securely bound to the specific email address submitted.</p><p>When the attacker enters their own email address and completes OTP verification successfully, the server responds with redirection headers (Location, X-Xhr-Redirect) and a frontend navigation script (Turbolinks.visit(…)) that advance the user to the account setup stage. If the attacker intercepts and saves this response, and then drops the request (so that account creation is not completed), the session remains active in the browser, <strong>still marked as “OTP verified.”</strong></p><p>Later, the attacker refreshes the page or clicks a reference button in the browser and attempts to register a new account using a different email address, such as a victim’s. The server issues a new OTP to the victim’s email, but the attacker enters a random or incorrect OTP. At this point, instead of letting the invalid attempt proceed, the attacker intercepts the OTP verification response and modifies it by injecting the previously captured redirect headers and Turbolinks script from the valid session. Because the same session token and cookie are still active, <strong>the backend assumes the session is already verified — and does not check whether the OTP being submitted actually belongs to the new (victim) email address.</strong></p><p>The frontend then blindly follows the spoofed redirection instructions, allowing the attacker to proceed to the password and username setup stage for the victim’s email. The attacker can now complete the account creation on behalf of the victim and even enable 2FA. Since the real user never receives or verifies the OTP, they are unaware that an account has been created using their email. In the future, when they try to register or reset their password, they will be blocked at the 2FA screen — which only the attacker can control.</p><pre>I: The vulnerability stems from several combined issues:<br>II: Session-level OTP trust without strict email binding<br>III: Lack of session re-initialization between registration attempts<br>IV: Frontend trust in redirect headers and scripts<br>V: No revalidation of OTP/email match during account creation</pre><p>These flaws together allow a complete bypass of the OTP verification step.</p><p>So, I successfully created a report for this bug, calculated the CVSS score, and forwarded it to the company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*TGAuFOpT26iw5Tl3suWdrg.gif" /></figure><p>After about one months, my bug report was reviewed, and I was rewarded with a bounty💸 in return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*jJ5PBbOan24f0GYXz-bPIA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x4psdcbOW-z4pKyxt-G2Uw.png" /><figcaption><strong>bounty💸</strong></figcaption></figure><p>I hope you enjoyed reading this article 😊. Don’t forget to follow me for more articles and write-ups in the future ✍️🔒. Thank you, and see you soon with a new story! 🚀👋</p><p>Follow On : <a href="https://www.linkedin.com/posts/divyank-sitapara-b0a369307_hackerone-websecurity-cybersec-activity-7369609714675912710-MM6y?utm_source=share&amp;utm_medium=member_android&amp;rcm=ACoAAE4vfPoBn465Cz9RDlQe_Ag7KXhjVvfitRE">linkedin.com</a></p><p>Follow On : <a href="https://x.com/SitaparaDivyank">x.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90f7ec989b1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cool XSRF vulnerability in the media upload functionality , which allowed deletion or editing of…]]></title>
            <link>https://medium.com/@divyanksitapara088/cool-xsrf-vulnerability-in-the-media-upload-functionality-which-allowed-deletion-or-editing-of-308f47671dac?source=rss-85e5f245efce------2</link>
            <guid isPermaLink="false">https://medium.com/p/308f47671dac</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <pubDate>Mon, 30 Jun 2025 11:20:45 GMT</pubDate>
            <atom:updated>2026-08-13T05:26:15.969Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cool XSRF vulnerability in the media upload functionality , which allowed deletion or editing of user-uploaded media items 💸</h3><p>Hello Community 👋,<br>I’m Divyank, a application security researcher (bug bounty hunter).<br>This is my first write-up, and in it, I’ll be explaining in detail the XSRF vulnerability I recently discovered on a popular platform.<br>So stay tuned till the end of the write-up — let’s get started! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnn0CQwv5tcE2orUr5v4Zw.png" /></figure><blockquote><em>🔒 Vulnerability Name : CWE-352: Cross-Site Request Forgery (CSRF)<br>#Severity: High(p2) [CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L] CVSS Score: 7.1</em></blockquote><blockquote><em>🛑Impact of this Attack : <br>This CSRF vulnerability allows unauthorized modification and deletion of user-uploaded media content. An attacker could exploit this to alter or remove media without the user’s consent, leading to potential loss of important content, disruption of user experience, and diminished trust in the platform. Moreover, malicious modifications could be used to distribute offensive or misleading content, causing reputational damage. The lack of proper CSRF protections undermines the platform’s data integrity and exposes it to broader security, legal, and compliance risks.</em></blockquote><h4>📜 A detailed summary of how I found this type of bug in the system :</h4><p>This was a self-hosted bug bounty program, which included a wildcard domain for testing. I decided to test the main domain directly and began my recon process. During recon, I attempted various types of injection vulnerabilities, but the site was protected by different types of CDN firewalls, which prevented the injection attacks from being executed.</p><p>As a result, I kept getting blocked every time. So, I decided to switch to manual testing using Burp Proxy and focused directly on testing the main domain of the site.</p><p>So, on the main domain, I started analyzing different types of application functionalities, and that’s when I came across an interesting post-related feature, which I decided to test. This post functionality allowed users to create, edit, manage, delete, and share their posts.</p><p>Additionally, I noticed that all the posts created by users were also being displayed in an “All Posts” section of the site:</p><pre><br>https://www.XYZ.com/allpost/</pre><p>This meant that any user on the system could view posts created by others</p><p>To test this, I logged into my Firefox account and created a post. Once uploaded, that post started appearing in both the “All Posts” section as well as in the user’s uploaded media section under their account.</p><p>After that, I wanted to analyze how the edit and delete functionalities of a post were working. So, I opened Burp Proxy, turned on intercept, clicked the Edit Post button, and captured the request, I observed that the request was using the POST method and was sending data in the request body. The body contained various post parameters and their values such as:</p><p>1.”title”</p><p>2.”description”</p><p>3.”allow_comments”,”allow_rating”, ”caption” , “filename” and many more</p><p>4.as well as identifiers like “image_id”, “imagetype_id”, and “category_id”.</p><p>One important thing I noticed was that there was no 🛡️CSRF protection token present in the request body. At that moment, I started thinking about testing it for XSRF.</p><p>I asked myself, “Is it possible to edit or delete a post uploaded and shared by another user on the system?”</p><p>To test this, I first decided to try it on my own account, just to confirm whether the bug was actually working, I took the intercepted request and created a CSRF HTML PoC file, where I modified the value of the “title” parameter, saved it in a text editor, and then opened it in the same browser session.</p><p>However, when I tried executing the CSRF by clicking the action in the PoC file, it didn’t work.<br>At that point, I was once again disappointed, thinking the XSRF bug might not be exploitable🥲.</p><p>So, I decided to try out different XSRF bypass techniques. First, I attempted to convert the POST request into a GET request. Then, I created a CSRF HTML PoC file with this change and saved it in a text editor. At this point, all the request parameters and their values were passed through the URL using the GET method. When the HTML file was opened in the browser, it sent the request with those parameters via GET.</p><p>I opened the modified HTML PoC file — and BOOM💥! The XSRF bug worked on my account.</p><p>The reason it worked is that modern browsers automatically add the “SameSite=Lax” cookie attribute to POST requests by default, which blocks CSRF unless the interaction is user-initiated.<br>But when I converted the POST request to a GET request, this restriction was bypassed, and the exploit succeeded.</p><blockquote><em>So at this point, the bug was 50% confirmed to be working. The next big question in my mind was: How 🤔 can I edit or delete the uploaded posts of any specific user in the system?</em></blockquote><blockquote><em>As I mentioned earlier, the request required three image identifier parameters. So I thought — if I could collect these parameters from a specific user’s post and insert them into my crafted request, then create a CSRF HTML PoC file using that data and share it with the targeted user, would it work?</em></blockquote><p>To test this, I created another account in Chrome (to act as the victim), and uploaded a post there. Then I switched to my attacker account in Firefox.</p><p>In the Firefox browser, I visited the victim’s profile page by entering this URL:</p><pre>https://profile.XYZ.com/profile/{chrome_victim_profile_username}</pre><p>From there, I was able to see the post and media uploaded by the victim.</p><p>Now, to delete and edit that specific image post, I needed the values of all three image-identifying parameters. So I asked myself — where can I get these values?</p><p>I hovered my mouse over the victim’s post, and at the bottom of the browser, it showed me a suggestion preview of the image URL:</p><pre>https://www.XYZ.com/level1/level2/{iamgeid} </pre><p>The last part, imageid, was the “image_id”, which I copied and saved into Notepad.</p><p>Next, to get the remaining two parameters, I right-clicked the image and selected “Open image in new tab”. The image URL looked like this:</p><pre>https://staticdelivery.XYZ.com/post/{imagetype_id}/{imagenumber-imagenumber}.jpg</pre><p>From here, I was able to extract the “imagetype_id”.</p><p>Additionally, I noticed that the “category_id” was always set to a default value of 5, so I used that.</p><p>With all three values collected, I opened my previously saved CSRF HTML file in a code editor, replaced the old values with these new ones, and changed the “description” parameter value to “CSRF POC”.</p><p>I saved the file and opened it in Chrome, where the victim account was logged in.</p><p>BOOM 💥 — the description of the victim’s specific posted image was changed successfully via the XSRF exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*16_U5dLdAyYJrqzeH7Gh4g.jpeg" /></figure><p>A similar scenario worked for deleting a post as well. The only difference was: To delete a targeted post, I just needed the values of “image_id “ and “imagetype_id”, which were enough for the delete request to succeed.</p><blockquote><em>I created a report for this bug and sent it to the company via email. After about a month, I received a response, and they awarded me a $$$💸 bounty payout.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LzTvDmgfAifODhANF-VkWQ.png" /></figure><p>Okay friend 😇, I hope you liked this write-up, 🚀See you again with a new bug bounty write-up.</p><p>Thank you!</p><p>Follow On :<a href="https://x.com/SitaparaDivyank"> x.com</a></p><p>Follow On : <a href="https://in.linkedin.com/in/divyank-sitapara-b0a369307?trk=public_post_feed-actor-name">linkedin.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=308f47671dac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>