<?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 Mahmoud Farag on Medium]]></title>
        <description><![CDATA[Stories by Mahmoud Farag on Medium]]></description>
        <link>https://medium.com/@mahmoudfarag.rm4?source=rss-435542f7a180------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*E0aczSX-c_x3AMV_HvQtJw@2x.jpeg</url>
            <title>Stories by Mahmoud Farag on Medium</title>
            <link>https://medium.com/@mahmoudfarag.rm4?source=rss-435542f7a180------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 01:14:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahmoudfarag.rm4/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[IDOR Trick Leads to Damage Across the Entire Business]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/idor-trick-leads-to-damage-across-the-entire-business-3ef86b1507aa?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ef86b1507aa</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 01:28:46 GMT</pubDate>
            <atom:updated>2026-10-07T01:28:46.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nkjx79j1_8iSTL7gbK-DvA.png" /></figure><p>الحمد لله، والصلاة والسلام على رسول الله</p><h4>Hello, I’m Mahmoud Farag (RM4).</h4><p>I’d like to share a security finding I discovered during my research.</p><p>A books platform let you delete a review through two different endpoints. One of them checks that the review is yours. The other one doesn’t — it just deletes whatever ID you hand it.</p><p>The catch is that you can’t get somebody else’s review ID from the website. Reviews are written in the mobile app.</p><h3>How I found it</h3><p>I started on the web application, doing what any user would do: I opened a book and went to leave a review.</p><p>There was no way to.</p><p>The site shows you the reviews other people wrote, their star ratings, the whole listing — but nowhere to write one yourself. To post a review, you need the mobile app. That’s the only place the feature exists.</p><p>That’s an interesting shape for an application to have. A whole write path that lives in one client and not the other, on a platform whose entire purpose is reviews. Two clients, one feature, and only one of them was built to handle it — which usually means only one of them was tested for it.</p><p>So I downloaded the mobile app.</p><p>Then I wrote a review from the phone and watched the request go out:</p><pre>POST /api/books/{book_id}/reviews</pre><p>And the response came back carrying the &quot;review_id&quot; of the review I had just written.</p><p>That’s the value the browser never sees. The web front-end never creates a review, so it never handles a fresh &quot;review_id&quot;, so that identifier had never once appeared in my browser traffic.</p><p>I had it now. And the only question left was whether the web API would take an identifier that came off the phone.</p><p>I copied the ID out of the mobile request, pasted it into the equivalent request on the web side, and sent it.</p><p>It took it.</p><h3>take the ID off the phone, spend it in the browser</h3><p>I wrote a review from the app as &quot;User B&quot;, kept the &quot;review_id&quot;, then logged into the website as &quot;User A&quot; — a completely separate account, no relationship to User B, no special role.</p><p>Then, with User A’s session:</p><pre>DELETE /api/books/{book_id}/reviews/{review_id} HTTP/2<br>Host: target.com<br>Cookie: &lt;User A session&gt;<br>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36</pre><pre>HTTP/2 204 No Content</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JavBOSWygVtB02CMlkBMdQ.png" /></figure><p>No error. No ownership complaint.</p><p>I checked the review:</p><pre>GET /api/reviews/{review_id}</pre><pre>HTTP/2 404 Not Found</pre><p>User B’s review was gone. Deleted by an account that had nothing to do with it, using an ID that came out of a different client entirely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zpsLgg2xlhhQh7i6j8hzzw.png" /></figure><h3>What the mobile app really gave me</h3><p>Worth being precise here, because it’s the thing that makes this finding what it is.</p><p>The app isn’t a bypass. It’s just the only place in the product where a &quot;review_id&quot; is put in front of a user.</p><p>The server treats that identifier as a global object reference. It doesn’t care that it was minted by the mobile backend, it doesn’t care which client is presenting it, and on the nested route it doesn’t care who’s asking. A value that the mobile API hands to its author is a live delete handle on the web API in anyone’s hands.</p><p>Which means the boundary the platform was relying on — <em>you only ever see your own review IDs</em> — is a UI boundary, not an authorization one.</p><h3>Impact</h3><p>Any authenticated user can permanently delete another user’s review by supplying its review_id.</p><ul><li>No victim interaction is required.</li><li>No privileged role is required.</li><li>The attacker only needs a valid account and the target review ID.</li><li>Deleted reviews cannot be restored through the application.</li></ul><p>Because reviews directly affect the books’ ratings and visible feedback, an attacker can repeatedly delete legitimate reviews and manipulate the platform’s review content and ratings.</p><p>Thank you for taking the time to read my write-up.</p><h3>Social</h3><p>LinkedIn: <a href="https://www.linkedin.com/in/mahmoud-farag4">https://www.linkedin.com/in/mahmoud-farag4</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ef86b1507aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unauthenticated Next.js Server Actions Leading to Zero Click Account Takeover]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/unauthenticated-next-js-server-actions-leading-to-zero-click-account-takeover-0b7d3d5a1039?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b7d3d5a1039</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 23:48:56 GMT</pubDate>
            <atom:updated>2026-09-16T23:48:56.668Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uv3vjtSEr3qp7F3LnFjXRg.png" /></figure><p>الحمد لله، والصلاة والسلام على رسول الله</p><p><strong>Hello, I’m Mahmoud Farag (RM4).</strong></p><p>I’d like to share a security finding I discovered during my research.</p><p>A subscription portal exposed two Next.js Server Actions without any authentication or authorization checks.</p><p>The first accepts an <strong>email address</strong> and returns the corresponding user’s Auth0 account information. The second allows an unauthenticated caller to set the <strong>password of any user ID they provide</strong>, resulting in account takeover.</p><h3>How I found it</h3><p>The app was Next.js App Router, which means Server Actions — server functions called straight from React components. The framework gives each one a 40-hex-character ID, ships that ID to the browser in the client bundle, and turns the call into a POST carrying a `Next-Action` header.</p><p>That header is the part that matters. Dispatch happens on it rather than on the path, and the request body is simply the function’s arguments, positionally. There’s no route file to wrap in middleware — so if the authorization check isn’t inside the function body, there isn’t one.</p><p>So I pulled the IDs out of the bundle, worked out each function’s arguments from the minified call sites around them, and replayed them with my cookies stripped.</p><p>Two of them answered.</p><h3>Step 1 — an email goes in, an Auth0 user comes out</h3><p>Sent with no cookies, no <strong>Authorization </strong>header, nothing:</p><pre>POST /particuliers/integrale-web-mensuel-2116 HTTP/2<br>Host: subdomain.target.com<br>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36<br>Next-Action: 42a24b711d12f695d798b371e38b584c551ebb6a<br>Content-Type: text/plain;charset=UTF-8<br>Accept: text/x-component<br>[&quot;victim@gmail.com&quot;,true]</pre><p>It came back with the account:</p><pre>{<br>&quot;user_id&quot;: &quot;auth0|000000000000000000000001&quot;,<br>&quot;email&quot;: &quot;researcher@example.com&quot;,<br>&quot;identities&quot;: [<br>{ &quot;provider&quot;: &quot;auth0&quot;, &quot;connection&quot;: &quot;www-target-com&quot; }<br>],<br>&quot;app_metadata&quot;: {<br>&quot;subscriber_number&quot;: &quot;900000000&quot;,<br>&quot;custom_user_id&quot;: &quot;00000000–0000–4000–8000–000000000000&quot;<br>}<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8qY1BbpSPgKjsV96bOvWQ.png" /></figure><p><strong>identities</strong> and <strong>app_metadata</strong> don’t come from Auth0’s public Authentication API. They come from the <strong>Management API</strong> — the admin one, reached with a machine-to-machine token holding scopes like <strong>read:users</strong> and <strong>update:users</strong>.</p><p>Which told me there’s a privileged Auth0 token on that server, and an unauthenticated function I control is holding it.</p><p>That alone is a finding. But it hands you two things the next action wants: a <strong>user_id</strong> and a <strong>connection</strong>.</p><h3>Step 2 — the takeover</h3><p>The second action took an object and a string. The object had <strong>password</strong> and <strong>connection</strong>. The string wanted a user id.</p><p>Against my own test account, still unauthenticated:</p><pre>POST / HTTP/2<br>Host: subdomain.target.com<br>Next-Action: 89abcdef0123456789abcdef0123456789abcdef<br>Content-Type: text/plain;charset=UTF-8<br>Accept: text/x-component<br>[{&quot;password&quot;:&quot;&lt;REDACTED&gt;&quot;,&quot;connection&quot;:&quot;www-target-com&quot;},&quot;auth0|000000000000000000000001&quot;]</pre><p>No cookie. No current password. No reset token, no email confirmation, no step-up.</p><p><strong>200 OK</strong>, with the updated user object in the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*95j4zADRYsXT1x_8.png" /></figure><p>Look at where the user id lives: it’s <strong>argument two</strong>. Not read from a session, not taken from a JWT <strong>sub </strong>claim — supplied by the caller. The server changes whichever account it’s told to.</p><p>I logged out, went to the login page, and signed in with the password I’d just set.</p><p>It worked.</p><h3>The same action takes an email</h3><p>The first argument is passed through to the Auth0 user update, so the field you put in it is the field that changes. Swap `password` for `email`:</p><pre>POST / HTTP/2<br>Host: subscribe.target.com<br>Next-Action: 89abcdef0123456789abcdef0123456789abcdef<br>Content-Type: text/plain;charset=UTF-8<br>Accept: text/x-component<br>[{&quot;email&quot;:&quot;attacker@example.com&quot;,&quot;connection&quot;:&quot;www-target-com&quot;},&quot;auth0|000000000000000000000001&quot;]</pre><p><strong>Same 200</strong>, same lack of any check that I own the account I’m editing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*5wv6iD06cV8Sdw0J.png" /></figure><p>That one matters more than it looks. The address on the account is where password resets are delivered — so once it’s the attacker’s address, the owner’s own recovery path stops leading back to them.</p><p>I logged out, went to the login page, and signed in with the password I’d just set.</p><p>It worked.</p><h4>Impact</h4><p>This is an account takeover. At the end of it I’m signed in as the victim, with a password I chose.</p><p>- <strong>Who’s affected</strong>:any subscriber, identified only by their email address.<br>- <strong>What the attacker needs</strong>: nothing else — no session, no password, no token, no click from the victim.<br>- <strong>What they get</strong>:the account, and whatever a signed-in customer can see and do in it — personal details, subscription and billing state.</p><p>Because the password is set rather than a session borrowed, the access doesn’t expire on its own.</p><p>Thank you for taking the time to read my write-up.</p><h3>Social: <a href="https://www.linkedin.com/in/mahmoud-farag4?utm_source=chatgpt.com">linkedin.com/in/mahmoud-farag4</a></h3><p>#BugBounty #WebSecurity #AccountTakeover #NextJS #CyberSecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b7d3d5a1039" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some Logic Bugs in Email Handling]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/some-logic-bugs-in-email-handling-72cd7d615412?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/72cd7d615412</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[business-logic-bug]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 01:38:05 GMT</pubDate>
            <atom:updated>2026-10-09T13:54:35.061Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>الحمدلله والصلاة والسلام على رسول الله</strong></p><p>A few small inconsistencies in email handling logic were enough to break trust in account identity flows across multiple systems.</p><p>this write-up presents a set of business logic vulnerabilities discovered in email handling flows across multiple applications. The issues highlight inconsistent backend validation and over-reliance on UI restrictions, leading to exploitable gaps in account identity and verification mechanisms.</p><h4>First One— Email Change Bypass via Direct API Access</h4><p>During browsing the user account inside the application, I noticed that the UI does not allow changing the email address at all, and there is no visible option inside the settings page to modify the email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*AkWFdgGISBgsQvoVIhs4Rg.png" /></figure><p>Exploit Flow</p><p>I started by testing normal profile data modification, such as the name, through a request responsible for updating the user via the endpoint:</p><pre>POST /auth/v3/user</pre><p>While inspecting the response, I noticed that the email address was included in the returned data, which indicates that it is handled internally within the same update flow.</p><p>After that, I attempted to change the endpoint used in the request from:</p><pre>POST /auth/v3/user</pre><p>to another endpoint related to email updating:</p><pre>POST /auth/v3/change/email</pre><p>During modifying the request body, I noticed that the same profile update payload allows passing additional fields that are not visible in the UI, which indicates the existence of Mass Assignment behavior inside the backend.</p><p>After that I sent the request in the following format:</p><pre>{<br> &quot;newEmail&quot;: &quot;test@gmail.com&quot;<br>}</pre><p>Once the request was sent, the change was accepted successfully, and the email address was actually updated in the account.</p><p>Discovery Insight</p><p>The main issue was that the backend allowed updating multiple attributes within the same request without a clear definition of allowed fields (whitelisting).</p><p>This created a Mass Assignment condition where sensitive fields such as email can be passed directly inside the same profile update flow.</p><h4>2 — Email Verification Inconsistency Across Subdomain API</h4><p>While using the account normally, I changed the email address through the UI inside the main domain.</p><p>I noticed that the system applied the change normally, with a verification email being sent as expected before the change is finally approved.</p><p>Exploit Flow</p><p>The process started normally through the settings page:</p><p><a href="https://www.duolingo.com/settings/profile">https://www.maindomain.com/settings/profile</a></p><p>I changed the email from the UI, and the verification step appeared correctly, and a confirmation email was sent to the new address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*oYGVpZxBzJnQ6iQ_uINnGg.png" /></figure><p>While continuing to observe the account behavior, I later moved to another subdomain belonging to the same service:</p><p><a href="https://englishtest.duolingo.com/">https://sub.maindomin.com</a></p><p>Using the same user session (shared authentication session), I opened the account settings inside this subdomain.</p><p>While inspecting the network requests, I noticed that profile updates were handled through a different endpoint:</p><p>POST /auth/update_profile</p><p>This endpoint was handling account data directly within the same session and reflecting the email state after the update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*iBtyb-xqohHLRIVYdYcRzw.png" /></figure><p>Upon reviewing the response, I noticed that the email address was being updated and reflected inside the system, but without the same strict verification level present in the main domain.</p><p>Discovery Insight</p><p>The main observation here was the existence of different enforcement logic between the main domain and the subdomain, where email verification was properly implemented in the main flow, while the subdomain was directly reflecting account state without fully enforcing the same validation rules.</p><h4>3 — Unverified Email Lock via Flawed Email Handling Logic</h4><p>While testing the account settings, I noticed that adding a secondary email requires a verification step when adding any new email inside the account.</p><p>In the normal case, any email change or addition is first sent to a verification step before being approved inside the system.</p><p>Exploit Flow</p><p>I started by logging into the account using my primary email normally, and I noticed that the system requires email verification before allowing certain account functionalities.</p><p>After that, I went into the account settings and tried to add a secondary email.</p><p>While entering the new email, I selected an email belonging to another user (victim email), but without completing the verification step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*733mw59zpc11QM_mlxRcpA.png" /></figure><p>Once the change was saved, the email was accepted inside the system in a pending state and associated with the account, even though it was not actually activated.</p><p>At this point, the target email became reserved inside the system.</p><p>Later, when the original owner of the email tried to create a new account or recover access, the system treated it as already taken, even though there was no active verified account using it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*vGfy_Djob7Bok7RdLMavEg.png" /></figure><p>Discovery Insight</p><p>The issue appeared because the system reserves the email address immediately upon addition before completing the verification process, instead of delaying the binding until ownership is confirmed.</p><p>This created a condition where any email can be reserved without any interaction from its real owner.</p><h3>Impact</h3><p>These issues collectively demonstrate weaknesses in email handling and identity verification logic, which can lead to:</p><ul><li>Unauthorized email modification or association</li><li>Email verification bypass in inconsistent flows</li><li>Email reservation without ownership confirmation</li><li>Potential account takeover (ATO) scenarios when chained with other issues</li><li>Denial of access or registration for legitimate users</li></ul><p>Overall, the flaws break core trust assumptions in account identity management across multiple flows.</p><p>It was a pleasure sharing my findings with you.<br>This concludes my report regarding the observed issues in email handling and identity verification flows.</p><p>Thank you for your time and consideration.</p><p>Best regards,<br><strong>Mahmoud Farag (RM4)</strong><br>LinkedIn: <a href="https://www.linkedin.com/in/mahmoud-farag4">https://www.linkedin.com/in/mahmoud-farag4</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*xbrVlxAld-vblSXO8Mp_pQ@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*806DBElT4cw_bA_KqAvUEA@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*OLPzaxE30H-IgOCcY1k9Zg@2x.jpeg" /></figure><p><strong>#BugBounty #CyberSecurity #WebSecurity #EthicalHacking #PenetrationTesting #InfoSec #OWASP #APIsecurity #BusinessLogic #AccountTakeover #Authentication #Authorization #VulnerabilityResearch #HackingWriteups #SecureCoding</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72cd7d615412" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Small Validation Bypass Enabled Invisible Identities]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/how-a-small-validation-bypass-enabled-invisible-identities-cc600577b98d?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc600577b98d</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[unicode]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[input-validation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 23:09:12 GMT</pubDate>
            <atom:updated>2026-02-22T23:36:55.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pY1aVR0HeQ6D_DCtIl1HrQ.png" /></figure><h3>الحمد لله والصلاة والسلام على رسول الله وعلى آله وصحبه أما بعد</h3><p>What makes this bypass particularly dangerous is that it doesn’t rely on classic tricks like null bytes.<br>Zero-width Unicode characters are far more powerful — the input is technically non-empty, yet visually nonexistent.</p><h4>Core Idea</h4><p>Most applications validate required name fields like this:</p><pre>$name = trim($name);<br><br>if ($name !== &#39;&#39; &amp;&amp; preg_match(&#39;/[^\p{Z}\p{Cf}]/u&#39;, $name)) {<br>    // accept input<br>}</pre><p>Zero-Width Payload</p><p>The payload used is a zero-width Unicode character that looks completely empty:</p><h4>Example payload</h4><pre>()​‌</pre><p>Yes, you don’t see anything, and this is what is required, most of the programs think it’s a real Caracter and I’ll give you, so the problem starts from here</p><h4>Account Creation Example</h4><p>Normal request</p><pre>POST /api/register<br>Content-Type: application/json<br><br>{<br>  &quot;name&quot;: &quot;User&quot;,<br>  &quot;email&quot;: &quot;user@test.com&quot;<br>}</pre><h4>Bypass using zero-width characters</h4><pre>POST /api/register<br>Content-Type: application/json<br><br>{<br>  &quot;name&quot;: &quot;‌‌‌&quot;,<br>  &quot;email&quot;: &quot;user@test.com&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*QMBgmpMs-cEaIZv92C3reQ.png" /></figure><ul><li>Why This Is Stronger Than Null Byte</li></ul><p><em>Null byte (\x00) -&gt; often filtered or truncated<br>Zero-width chars -&gt; valid Unicode, rarely normalized</em></p><p>Zero-width characters effectively make null bytes irrelevant.<br>The input exists — the identity does not.</p><p>During testing, I encountered a case where the application initially blocked the zero-width payload and did not allow the bypass to work.</p><p>While experimenting, I noticed an interesting behavior:</p><p>when I inserted a single space followed by any English character, the application automatically removed the space and kept only the visible characters.</p><p>This indicated that some form of input normalization or trimming was applied.</p><p>Based on this behavior, I tried a different approach:</p><p>I inserted two consecutive spaces instead of one before applying the payload.</p><p>Surprisingly, this bypassed the normalization logic, and the validation accepted the input successfully.</p><p>At that point, the zero-width payload worked as expected, and the bypass was successful.</p><p>This demonstrated that:</p><p>•	Input handling logic was inconsistent</p><p>•	Validation depended on fragile. normalization rules</p><p>•	Small changes in whitespace handling were enough to fully bypass protections</p><p>It confirmed that this issue was not theoretical, but practically exploitable with minor payload adjustments.</p><h4>Affected Inputs</h4><p>- First name / Last name<br>- Company name is the same as organization name.<br>- Organization name <br>- Team name<br>- API key name</p><p>Any input that could be valid for the name field</p><ul><li>Each input may need a slightly different amount of zero-width characters,<br> but the bypass logic stays the same.</li></ul><h4>Additional Scenario</h4><p>During testing, the application initially blocked the zero-width payload.</p><p>I noticed that when entering a single space followed by English characters, the application automatically removed the space and kept only the characters.</p><p>Based on this behavior, I tried inserting two consecutive spaces before the payload.<br> This bypassed the input normalization, and the payload was accepted successfully.</p><p>This confirms that inconsistent whitespace handling allowed a practical bypass with minimal input changes.</p><h4>Impact Scenarios</h4><p>1- Invisible Organization Member</p><p>- Attacker receives an organization invite<br>- Joins using a zero-width name<br>- Appears as a blank user in members list</p><p>2- Anonymous Actions in Logs</p><p>- Create API keys<br>- Delete resources<br>- Modify settings</p><p>All actions are attributed to an invisible identity.</p><p>3- Account Confusion (No Email Verification)</p><p>- <a href="/service/mailto:admin@test.com">admin@test.com</a>‌</p><p>In weak systems, this may be treated as the same email,<br>leading to identity confusion or collisions.</p><p>4- This issue can also be chained with other vulnerabilities, increasing the impact [<a href="https://medium.com/@amralaa66652/how-one-character-can-destroy-an-account-38a2e5337c7e">https://medium.com/@amralaa66652/how-one-character-can-destroy-an-account-38a2e5337c7e</a>]</p><h4>collaborate with : <a href="https://medium.com/u/7eee60663bc1">Amralaa</a> , <a href="https://medium.com/u/8c28a470af1d">0xbug</a></h4><h3>some reports for this bug</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*4ea-zC38bT1N7zaANXIy9A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*SUQiRSe5XemkjaCmV8ibsA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*Mdz1CfKlRZBkwBPpEC4lIQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*Kka7C6I9VLvwwZuEAd4akg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*dC2GBj0YpLybBI98LXO5fg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*2KPAW0syk0jbeoa1aYlNZw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*qD7yOKQKqneFBNN6sOtFPA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*pMb1L19uNXW2RWHAMKnt6w.jpeg" /></figure><p>#CyberSecurity #BugBounty #WebSecurity #ApplicationSecurity #EthicalHacking #InputValidation #UnicodeSecurity #SecurityResearch</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc600577b98d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Takeover Via Reflected XSS]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/account-takeover-via-reflected-xss-6cd982ebff8d?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cd982ebff8d</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Thu, 06 Nov 2025 21:03:25 GMT</pubDate>
            <atom:updated>2025-11-06T21:03:25.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*202CoZDsWTFT0oGH-oy9dA.png" /></figure><h4>الحمد لله والصلاة والسلام على رسول الله وعلى آله وصحبه أما بعد</h4><p>I’m Mahmoud Farag — a security researcher and bug hunter on YesWeHack and Intigriti.</p><h3>TL;DR</h3><p>I found XSS reflected in the search endpoint of a news platform. The payload executed in victims’ browsers and combined with a phishing redirect to an XSS logging service — allowed cookie/session exfiltration and practical account takeover scenarios. I reported six duplicate findings across country-specific programs.</p><h3>Scenario</h3><p>I used subdomainfinder.c99.nl to search for subdomains of this program. I went through each site to see how it worked and what services it offered. I found a website that was still running with outdated services and started hunting for inputs. After I found an injection point, I began testing XSS payloads — and after trying several, one of them finally worked for me this is the one:</p><pre>&quot;&gt;&lt;iframe/src=&quot;javascript:alert(1)&gt;&quot;autofocus&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4WbF4VY2tmHKCa2oa7ezVg.jpeg" /></figure><p>And just like that, I had an XSS. I escalated the impact by using a website:<a href="https://xss.report/dashboard">https://xss.report/dashboard</a> in short, it’s a website you sign up for and use to generate the payload you need — when the victim clicks it, the site captures their sessions, IP, and other information and shows everything on your dashboard.<br>I used ParamSpider to discover parameters to inject into the link, then injected the payload and sent the link to the victim. I had the link ready and could send it to anyone to steal their session — I could log into the account and do whatever I wanted, And I did this across six different programs belonging to the same company.</p><h3>Exploitation</h3><p>1- I used subdomainfinder.c99.nl to search for subdomains of this program.</p><p>2- I checked each site to see how it worked and what services it offered.</p><p>3- I found a site that was still running outdated services.</p><p>4- I started hunting for input points.</p><p>5- After finding an injection point, I tested XSS payloads until one finally worked.</p><p>6- And just like that, I had a working reflected XSS.</p><p>7- I escalated the impact by using an external logging service.(xss.report)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bUMOovjSS8RH4tZu80c9A.png" /></figure><p>8- In short: the service generates payloads — when a victim visits, it captures sessions, IPs, and other info and shows everything on a dashboard.</p><p>9- I used ParamSpider to discover injectable parameters, injected the payload, and prepared the link.</p><p>10- The prepared link could be sent to a target to steal their session allowing login and full account access if the session was readable.</p><h3>Impact</h3><ul><li>Account Takeover</li><li>Session Theft &amp; Persistent Access</li><li>Phishing Weaponization &amp; Mass Exploitation</li><li>Data Exfiltration &amp; Privacy Loss</li></ul><p>Thank you for your time, and I hope you found this helpful.</p><p>My LinkedIn : <a href="https://www.linkedin.com/in/mahmoud-farag4">https://www.linkedin.com/in/mahmoud-farag4</a></p><p>#XSS #WebSecurity #BugBounty #Infosec #Cybersecurity #WebAppSec#SecurityResearch #PenetrationTesting #EthicalHacking</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cd982ebff8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Takeover And Staying Logged In Forever After Password Reset]]></title>
            <link>https://medium.com/@mahmoudfarag.rm4/account-takeover-and-staying-logged-in-forever-after-password-reset-b0ed4b65ac22?source=rss-435542f7a180------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0ed4b65ac22</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-zero]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Mahmoud Farag]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 17:26:38 GMT</pubDate>
            <atom:updated>2025-11-02T12:13:20.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*6F3bND-tT6I5H3juwUut4A.png" /></figure><h4>الحمد لله والصلاة والسلام على رسول الله وعلى آله وصحبه أما بعد</h4><p><strong>I’m Mahmoud Farag — a security researcher and bug hunter on YesWeHack.</strong></p><h4>TL;DR</h4><p>During an authorized test I discovered the system allows account creation without email verification and issues access_token and refresh_token at signup. If the real account owner later signs in with Google or changes/resets their password, the old tokens the attacker obtained remain valid — enabling persistent access. All sensitive data in this post is redacted.</p><h4>Scenario</h4><ul><li>I can register any email on the platform because the system does not require email verification during signup.</li><li>If the legitimate account owner later signs in using Google, this does not prevent the attacker — who created the unverified account — from maintaining control over the same account.</li><li>When the real account owner uses the Reset Password flow and changes their password, the attacker still retains the refresh_token obtained during signup. This token is not revoked or expired as a result of the password change.</li><li>The attacker can, at any later time, use the stored token to generate new access tokens and regain full access to the account — allowing actions such as viewing PII or changing account settings.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1skD0kr7og0LBrT6KqCBOA.png" /></figure><h4>Impact</h4><ul><li>Critical Account Takeover: Changing the password does not terminate stolen tokens; the attacker retains account control even after the victim performs recovery steps.</li><li>High — Data &amp; Financial Exposure: Potential access to user-sensitive data, subscriptions, and billing information.</li><li>High — Fraud &amp; Abuse: The attacker can carry out actions as the victim or misuse paid features.</li><li>Medium — Reputational / Operational: Incident response burden, user notifications, and regulatory obligations.</li></ul><h4>Technical Reasons</h4><p>1. Refresh tokens issued to unverified accounts (email_verified: false).<br>2. No mechanism to revoke/invalidate tokens on password reset/change.<br>3. No refresh-token rotation or reuse detection.<br>4. Lack of email canonicalization/normalization (e.g., Gmail aliases / dot-variants), allowing creation of logically-duplicate accounts.</p><h4>PoC</h4><p>1. Created an account using an email variation that logically maps to the victim’s mailbox (alias). The system created the account without verification and issued tokens.<br>2. Saved the issued refresh_token.<br>3. Later, the victim used “Forgot Password” and successfully changed their password.<br>4. After the password change, used the saved refresh_token and observed the system returned a new access_token — demonstrating the original refresh token was not revoked.</p><ul><li>Result: I was able to access the account and perform actions even though the victim had changed their password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*vewoFoIzoEL6lJMATpEaxw@2x.jpeg" /></figure><p><em>My LinkedIn : </em><a href="https://www.linkedin.com/in/mahmoud-farag4">https://www.linkedin.com/in/mahmoud-farag4</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0ed4b65ac22" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>