<?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 Adham Heinrich on Medium]]></title>
        <description><![CDATA[Stories by Adham Heinrich on Medium]]></description>
        <link>https://medium.com/@banertheinrich?source=rss-601a7f5e696d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w4sZFDLmhzimc6j1nPwbnw@2x.jpeg</url>
            <title>Stories by Adham Heinrich on Medium</title>
            <link>https://medium.com/@banertheinrich?source=rss-601a7f5e696d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:42:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@banertheinrich/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[Invalid Role Leads to Organization Lockout and Unauthorized API Access]]></title>
            <link>https://medium.com/@banertheinrich/invalid-role-leads-to-organization-lockout-and-unauthorized-api-access-511a180c8fb9?source=rss-601a7f5e696d------2</link>
            <guid isPermaLink="false">https://medium.com/p/511a180c8fb9</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bugbounty-poc]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Adham Heinrich]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 12:37:01 GMT</pubDate>
            <atom:updated>2026-10-17T12:37:01.656Z</atom:updated>
            <content:encoded><![CDATA[<p>السلام عليكم</p><h3>Introduction</h3><p>In this write-up, I’ll explain how I discovered a role validation vulnerability in a web application that allowed an invalid user role to be accepted by the backend, causing organization management issues and unauthorized API access.</p><h3>Discovery</h3><p>While testing the application’s role management functionality, I noticed that administrators could modify users’ roles through an API request.</p><p>I intercepted the request using Burp Suite and examined how the server handled role changes.</p><p>The request looked like this:</p><pre>PUT /api/teams/&lt;team_id&gt;/users/&lt;user_id&gt;/roles/default</pre><p>The request body contained the target user’s ID and the new role:</p><pre>{<br>  &quot;userId&quot;: &quot;&lt;target_user_id&gt;&quot;,<br>  &quot;role&quot;: &quot;5&quot;<br>}</pre><p>Instead of rejecting the unsupported role value, the server responded with:</p><pre>HTTP/2 204 No Content</pre><p>This indicated that the request had been accepted.</p><h3>Testing the Impact</h3><p>After refreshing the application, I noticed that the affected user’s role was displayed as null.</p><p>More importantly, the account remained associated with the project, while the organization owner and administrators could no longer modify or remove the affected user through the interface.</p><p>I then tested the affected account’s access to the application’s API.</p><p>Although the account had no valid role, it could still access certain team and user-information endpoints directly.</p><p>This revealed two problems:</p><ul><li>The backend accepted an unsupported role value.</li><li>API authorization was not consistently enforced for the resulting null-role account.</li></ul><p><strong>Steps to reproduce :</strong></p><ol><li>Create test accounts with Owner, Admin, and Developer roles.</li><li>Log in as Admin and intercept a request that changes the Developer’s role.</li><li>Modify the role value to &quot;5&quot;.</li><li>Forward the request and observe the 204 No Content response.</li><li>Refresh the Owner and Admin sessions.</li><li>Verify that the affected user’s role is now null and that the user cannot be removed through the interface.</li><li>Log in as the affected user and send requests to the relevant team or user-information API endpoints.</li><li>Verify that the API returns information the account should not be authorized to access.</li></ol><h3>Conclusion</h3><p>This finding demonstrated how accepting an unsupported role value can create an inconsistent authorization state, potentially allowing unauthorized API access while preventing administrators from managing the affected user.</p><p>Happy hunting .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=511a180c8fb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JWT Privilege Escalation to Container RCE via Jinja2 SSTI “ Intigriti challenge”]]></title>
            <link>https://medium.com/@banertheinrich/jwt-privilege-escalation-to-container-rce-via-jinja2-ssti-intigriti-challenge-16186324241c?source=rss-601a7f5e696d------2</link>
            <guid isPermaLink="false">https://medium.com/p/16186324241c</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Adham Heinrich]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 01:05:18 GMT</pubDate>
            <atom:updated>2025-11-27T01:05:18.522Z</atom:updated>
            <content:encoded><![CDATA[<p>The application is a Flask-based e-commerce platform running inside a Docker container. The attack chain combines a JWT role forgery vulnerability with a high-impact Server-Side Template Injection (SSTI) in the “Change Display Name” feature, ultimately leading to unrestricted remote code execution as the application user.<br>1. Initial Access &amp; JWT Role Forgery<br>The registration endpoint creates regular user accounts and immediately returns a signed JWT (HS256).<br>Decoding the token revealed a predictable payload containing user_id, username, and role.<br>Although the server did not support the “none” algorithm, the application trusted the role claim without any secondary verification server-side.<br>Using Burp Suite’s JWT Editor extension, the payload was modified from:<br>JSON<br>{“user_id”:9,”username”:”adham”,”role”:”user”}<br>to<br>JSON<br>{“user_id”:1,”username”:”admin”,”role”:”admin”<br>After re-signing the token with the non algorithm, the application accepted it and granted full administrative privileges.</p><p>2. SSTI Discovery in “Change Display Name”<br>The admin panel allowed changing the display name, which was directly rendered using Jinja2 templating without proper sanitization.<br>Basic test ${{7*7}} rendered as $49, confirming Jinja2 SSTI (the $ prefix is characteristic of this challenge’s rendering behavior).</p><p>3. Bypassing Heavy Blacklists<br>Classic payload chains like ‘’.class.mro[1].subclasses() returned empty or heavily filtered results, indicating aggressive attribute/class blacklisting.<br>However, the config object and its __init__.__globals__ attribute were not filtered at all.<br>This gave direct access to Python builtins:<br>{{ config.__class__.__init__.__globals__[‘__builtins__’] }}</p><p>4. Achieving Remote Code Execution<br>With __builtins__ exposed, arbitrary command execution became trivial:<br>jinja<br>{{ config.__class__.__init__.__globals__[‘__builtins__’].eval(“__import__(‘os’).popen(‘id’).read()”) }}<br>Confirmed execution as appuser inside the container.<br>Further commands allowed full directory traversal, source code inspection, and sensitive file disclosure.</p><p>.<br>Last thing , I searched the word “ intigriti “ to get the flag , I got it !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16186324241c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IDOR leads to leak private user’s data]]></title>
            <link>https://medium.com/@banertheinrich/idor-leads-to-leak-private-users-data-3a2b59f58826?source=rss-601a7f5e696d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a2b59f58826</guid>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[idor-vulnerability]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Adham Heinrich]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 13:27:56 GMT</pubDate>
            <atom:updated>2024-12-11T13:27:56.725Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong><br>بسم الله الرحمن الرحيم و الصلاة و السلام على أشرف المرسلين<br>Hello! My name is Adham Heinrich, and this is my second write-up. Today, I’ll walk you through how I identified an IDOR (Insecure Direct Object Reference) vulnerability on an online shopping website that exposed sensitive user data.</p><p><strong>Background</strong><br>The target website is an online shop. After two days of exploring its technologies and concept, I used various reconnaissance techniques, including:</p><ul><li>Enumerating subdomains</li><li>Fuzzing paths</li><li>Testing for logic bugs</li></ul><p>Unfortunately, none of these methods revealed any vulnerabilities. As part of my standard process, I turned to <strong>waybackurls</strong> to extract historical URLs related to the target domain. I then filtered the results for the keyword “token,” hoping to uncover potential sensitive information. Here’s the command I used:</p><pre>echo &quot;https://www.target.com&quot; | waybackurls | grep &quot;token&quot;</pre><p>This approach revealed several URLs associated with a subdomain:</p><p><strong>community.target.com</strong></p><p>I accessed the identified URLs and noticed sensitive user data being displayed. Since this subdomain did not seem to allow interaction between users, it raised questions about why this data was visible in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSR5g0ukIpxjkjbzZ7T7-A.png" /></figure><p>To investigate further, I used <strong>Burp Suite</strong> to intercept requests and analyze the responses. In one particular request, I identified a parameter called id in the URL. Here’s an example:</p><pre>GET https://community.target.com/user?id=12345</pre><p>I modified the id value in the URL to test for IDOR by changing it to another user’s ID, such as id=12346. Upon sending the modified request, I received a response containing private information about another user.</p><p><strong>Findings</strong><br>The vulnerability allowed me to access sensitive user data by simply altering the id parameter in the URL. This data included:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-RDvuszqVfFVaUgtxhzlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47BiWxHBAMmMcoSPO92o7g.png" /></figure><p>This demonstrates a lack of proper authorization checks, as the server did not verify whether the requesting user had the right to access the data associated with the given id.</p><p><strong>Impact</strong><br>The exposure of private user data due to an IDOR vulnerability is a significant security risk. Such vulnerabilities can lead to:</p><ul><li>Breaches of user privacy</li><li>Potential exploitation by malicious actors</li><li>Violation of data protection regulations (e.g., GDPR)</li></ul><p><strong>Lessons Learned</strong><br>Here are some key takeaways from this experience:</p><ol><li><strong>Waybackurls and grep are powerful tools</strong>: Searching for specific keywords like “token” can uncover useful leads during recon.</li></ol><p><strong>2.Check for IDOR vulnerabilities in all endpoints</strong>: Always test whether parameters like id can be modified to access unauthorized data.</p><p><strong>4. Implement proper access controls</strong>: Ensure every request is validated to confirm the user’s permissions for accessing the requested resource.</p><p>و السلام عليكم و رحمة الله و بركاته</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a2b59f58826" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy logic bug that leaks the email for every user]]></title>
            <link>https://medium.com/@banertheinrich/easy-logic-bug-that-leaks-the-email-for-every-user-ef2d9d0cf088?source=rss-601a7f5e696d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef2d9d0cf088</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackerone]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Adham Heinrich]]></dc:creator>
            <pubDate>Mon, 04 Nov 2024 00:03:55 GMT</pubDate>
            <atom:updated>2024-11-04T00:07:21.035Z</atom:updated>
            <content:encoded><![CDATA[<h2>Easy bug that leaks the email for every user</h2><p>بسم الله الرحمن الرحيم و الصلاة و السلام على اشرف المرسلين</p><p>Hello guyz , my name is Adham Heinrich , I am bug hunter</p><p>That’s my first writeup , so excuse me for any mistakes</p><p>I was hunting on a private program on hackerone let’s call it : target.com</p><p>It’s a cloud service or like virtual machine to save your data in it .</p><p>After understanding the website , I tried the forget password function , it asks me for email or username (focus on username because the trick is here) , when I enter the email , the forget password link comes to me easily , but If I enter the username?</p><p>When I entered the username and saw the request in burpsuite , the email reflects in the response , so I tried to enter any other username to see what could happen ? It also reflects there email !</p><p>That small details could earn you easy money so dont forget to check the forget password function if it asks for username .</p><p>Elhamdollelah it was triaged and resolved successfully ❤️</p><p>السلام عليكم و رحمة الله ❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef2d9d0cf088" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>