<?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 Ahmed Khalil on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Khalil on Medium]]></description>
        <link>https://medium.com/@iTsKhalil?source=rss-655cbbe02caf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qzu04rbYLBpmFMJG3fbR4g.jpeg</url>
            <title>Stories by Ahmed Khalil on Medium</title>
            <link>https://medium.com/@iTsKhalil?source=rss-655cbbe02caf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:57:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iTsKhalil/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[How a Simple Client-Side Manipulation Led to Admin Panel Access]]></title>
            <link>https://medium.com/@iTsKhalil/how-simple-client-side-manipulation-led-to-full-admin-panel-access-p1-a4c883b11310?source=rss-655cbbe02caf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4c883b11310</guid>
            <dc:creator><![CDATA[Ahmed Khalil]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 13:33:13 GMT</pubDate>
            <atom:updated>2026-08-10T18:49:21.244Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello everyone! My name is Ahmed Khalil and I am a passionate cybersecurity researcher and bug bounty hunter. I spend most of my time hunting for vulnerabilities in web applications.</p><p>Today, I want to share a recent finding that highlights one of the most fundamental rules of web security: <strong>Never trust the client.</strong> What started as a simple test on a public platform quickly escalated into a <strong>P1 (Critical)</strong> vulnerability, allowing me to fully take over an admin panel using nothing but Burp Suite’s Match &amp; Replace feature.</p><p>Here is how a simple client-side manipulation led to a complete privilege escalation.</p><h3>The Target</h3><p>The target was “www.REDACTED.com”, a platform used for sharing blogs.</p><p>I started by registering a standard user account. At this point, I had no idea that an admin panel even existed on this domain. I was just browsing the application and proxying the traffic through Burp Suite.</p><p>When I saw the endpoint that returns my profile data (/web_api/v1/users/me), I noticed the server responded with this JSON snippet:</p><pre>{<br>  &quot;roles&quot;: [],<br>  &quot;highest_role&quot;: &quot;user&quot;<br>}</pre><p>Seeing fields like &quot;highest_role&quot; returned directly to the client is always an invitation to tinker. I wondered how the frontend would react if I tampered with these values.</p><h3>Step 1: Manipulating the Highest Role</h3><p>I decided to test this by using Burp Suite’s <strong>Match &amp; Replace</strong> feature. I set up a simple rule to modify the server’s response on the fly:</p><ul><li><strong>Match:</strong> &quot;highest_role&quot;:&quot;user&quot;</li><li><strong>Replace:</strong> &quot;highest_role&quot;:&quot;admin&quot;</li></ul><p>I refreshed the page and clicked on my profile avatar to open the dropdown menu. To my surprise, a completely new option had appeared: <strong>“Manage platform”</strong>.</p><p>I was excited. I clicked the button, expecting to see the admin dashboard. However, instead of loading the panel, the application threw an <strong>Error</strong>.</p><p>It became clear that simply changing &quot;highest_role&quot; was enough to trick the frontend UI into showing the button, but the backend (or the frontend routing logic) was still checking the roles: [] array, which was empty. I needed the exact JSON structure of an admin role to bypass this.</p><h3>Step 2: Reconnaissance to Find the Missing Payload</h3><p>I needed to know what a valid admin roles:[] array looked like. Guessing the exact keys and values (like permissions, booleans, or type names) would be nearly impossible.</p><p>I started exploring the platform’s public features. I noticed that when administrators or authorized users published a blog post or a public project, the API returned their user ID. I took one of these author IDs and navigated to the API endpoint responsible for fetching a user’s public data.</p><p>The API wasn’t just returning their name and avatar — it was leaking their role structure in the public data. I found exactly what I was looking for:</p><pre> {<br>    &quot;roles&quot;:[{&quot;type&quot;:&quot;admin&quot;,&quot;project_reviewer&quot;:true}]<br> }</pre><h3>Step 3: The Successful Exploit</h3><p>Armed with the correct payload, I went back to Burp Suite and updated my Match &amp; Replace rules to manipulate both fields simultaneously:</p><ul><li><strong>Rule 1</strong></li><li><strong>Match:</strong> &quot;highest_role&quot;:&quot;user&quot;</li><li><strong>Replace:</strong> &quot;highest_role&quot;:&quot;admin&quot;</li><li><strong>Rule 2</strong></li><li><strong>Match:</strong> &quot;roles&quot;:[]</li><li><strong>Replace:</strong> &quot;roles&quot;:[{&quot;type&quot;:&quot;admin&quot;,&quot;project_reviewer&quot;:true}]</li></ul><p>I reloaded the page, opened the profile dropdown, and clicked <strong>“Manage platform”</strong> once again.</p><p>This time, there was no error. The admin dashboard successfully loaded at /admin/dashboard/overview. The backend had completely accepted my manipulated role data, failing to enforce proper authorization checks!</p><h3>Proving the Impact (Client-Side vs. Server-Side)</h3><p>I immediately reported the vulnerability. However, in bug bounty, UI manipulation is often dismissed as a “Client-Side only” issue unless you can prove that you can actually perform server-side actions.</p><p>The triage team quickly got back to me:</p><blockquote>“Are you able to create anything? If yes, can you please create one sample form with just test/poc inputs? Nothing harmful please.”</blockquote><p>To prove the severity without causing damage, I recorded a Proof of Concept (PoC) video demonstrating that I could successfully send POST/GET requests to:</p><ul><li>Create a new folder.</li><li>View archived private projects.</li></ul><p>Later, another triager asked for further clarification:</p><blockquote>“Could you please confirm whether the lower privileged user grants administrative permissions everywhere on the server?”</blockquote><p>I recorded a final PoC video proving that the privilege escalation was complete. As a low-privileged user, I could access and modify core website settings, including:</p><ul><li><strong>Topics</strong></li><li><strong>Areas</strong></li></ul><p>This proved that the bug wasn’t just a UI glitch — it was a complete compromise of the platform’s administrative operations.</p><h3>The Impact &amp; Resolution</h3><p>By exploiting this Broken Access Control vulnerability, an attacker with a standard account could:</p><ul><li>Access the entire admin dashboard.</li><li>View, modify, or delete administrative data and archived projects.</li><li>Potentially access sensitive user information.</li><li>Alter core platform configurations.</li></ul><h3>Takeaway for Developers</h3><p>This vulnerability is a classic example of <strong>Broken Access Control</strong>.</p><p><strong>The Golden Rule:</strong> Never trust the client.</p><p>Hiding administrative UI elements based on JSON responses is fine for user experience, but <strong>every single API endpoint</strong> must independently verify the user’s session token and permissions on the server side before executing an action or returning sensitive data. Furthermore, ensure that endpoints returning public user data do not inadvertently leak internal role structures or permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*y3gwLiKOUjk4fV0wULS7lg.png" /></figure><p><em>Thank you for reading! If you enjoyed this write-up, feel free to follow me for more bug bounty tips, write-ups, and cybersecurity content. Happy hunting!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4c883b11310" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>