<?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 Youssef elhosary on Medium]]></title>
        <description><![CDATA[Stories by Youssef elhosary on Medium]]></description>
        <link>https://medium.com/@youssefelhosary?source=rss-cec0191eb112------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OeJZpewILbhx4RXOv3hfBg.jpeg</url>
            <title>Stories by Youssef elhosary on Medium</title>
            <link>https://medium.com/@youssefelhosary?source=rss-cec0191eb112------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:47:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@youssefelhosary/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[CVE Patch Bypass: How a Semicolon Reopened a Fixed Access-Control Vulnerability]]></title>
            <link>https://youssefelhosary.medium.com/cve-patch-bypass-how-a-semicolon-reopened-a-fixed-access-control-vulnerability-08dfe1fd813c?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/08dfe1fd813c</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 12:22:39 GMT</pubDate>
            <atom:updated>2026-10-17T12:24:38.386Z</atom:updated>
            <content:encoded><![CDATA[<p>“وما بكم من نعمة فمن الله”</p><p>I’m YOUSSEF ELHOSARY, a Security Researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and responsibly disclosing security vulnerabilities while continuously improving my offensive security skills. This write-up is about a case where a patched, critical CVE turned out to still be exploitable — just through a slightly different door.</p><h3>Summary</h3><p>A reverse-proxy / access-control gateway had recently patched a <strong>critical, CVSS 10.0 path-traversal vulnerability</strong> that allowed attackers to bypass authentication rules using ../ sequences in the URL path. The fix normalized the path lexically before matching it against access rules.</p><p>While reviewing the patch, I noticed the normalization logic didn’t account for <strong>matrix parameters</strong> (; segments) — a URL feature that many upstream servers (Servlet-based frameworks in particular) strip out <em>after</em> the gateway has already made its access decision. That mismatch reopened the exact same class of bug the patch was supposed to close.</p><h3>Step 1 — Starting From the Patch, Not the Bug</h3><p>Instead of hunting for a brand-new vulnerability, I started by reading the fix for a recently disclosed critical CVE in the target’s access-control gateway. The original bug was a classic lexical path traversal: requests like /public/../admin/secret could reach restricted routes because the gateway evaluated the raw, unnormalized path.</p><p>The vendor’s fix added path.Clean() before rule matching — a standard, reasonable fix for literal .. traversal.</p><h3>Step 2 — Testing the Obvious Case First</h3><p>Before looking for anything clever, I confirmed the original bug was actually closed:</p><pre>GET /public/../admin/secret<br>→ 401 Unauthorized</pre><p>Good. Lexical .. traversal was dead. Most people would stop here and move on.</p><h3>Step 3 — Thinking About Who Else Parses This Path</h3><p>path.Clean() only understands one dialect of &quot;path.&quot; It has no concept of <strong>matrix parameters</strong> — the semicolon syntax (;key=value or just ;param) that&#39;s part of the URL spec but mostly forgotten today.</p><p>Critically, <strong>Servlet containers</strong> (Tomcat, Jetty, Spring Boot, Undertow) <em>do</em> understand them — and strip them out, per path segment, before resolving .. themselves. That gave me an idea: what if the gateway and the upstream server disagree on what the path even <em>is</em>?</p><h3>Step 4 — Building the Differential</h3><p>If the gateway matches on the raw path (semicolons included, since path.Clean ignores them) but the upstream strips semicolons before resolving .., then a path like:</p><pre>/public/..;/admin/secret</pre><ul><li>Looks like it starts with /public/ to the gateway → matches the permissive, anonymous-access rule.</li><li>Gets normalized by the upstream Servlet container, which strips ; and resolves .. → becomes /admin/secret.</li></ul><p>Two components looking at the same request, computing two different “real” paths. Whichever one decides access control owns the whole pipeline — and it was deciding based on the wrong path.</p><h3>Step 5 — Building a Lab to Prove It</h3><p>I built a small lab: one access-control rule for /public/&lt;.*&gt; (anonymous), one for /admin/&lt;.*&gt; (always unauthorized), both proxying to a mock upstream that emulates Servlet-style normalization and logs the effective path plus whatever subject header the gateway injected.</p><p>bash</p><pre># Baseline — enforcement works correctly:<br>curl -i http://localhost:4455/admin/secret<br># → 401 Unauthorized</pre><pre># The bypass (note --path-as-is: curl must NOT normalize the URL itself):<br>curl -g -i --path-as-is &quot;http://localhost:4455/public/..;/admin/secret&quot;<br># → 200 {&quot;leaked&quot;:&quot;ADMIN AREA REACHED&quot;,&quot;effective_path&quot;:&quot;/admin/secret&quot;}</pre><pre># mock upstream log:<br>#   raw_path:                               /public/..;/admin/secret<br>#   effective_path_after_servlet_normalize:  /admin/secret<br>#   X-Subject-Header:                        anonymous</pre><p>Reproduced three times, including a second variant chaining multiple matrix segments: /public/x/..;/..;/admin/secret.</p><h3>Step 6 — Isolating the Variable</h3><p>To make sure this wasn’t just the old bug resurfacing under a different name, I re-ran the <em>patched</em> case without the semicolon:</p><pre>GET /public/../admin/secret<br>→ 401 Unauthorized</pre><p>Still blocked. The bypass is specifically tied to the ; segment differential, not a regression of the original fix.</p><h3>Root Cause</h3><p>Two components in the request path compute two different normalized paths from the same input:</p><p>StageBehaviorAccess-rule matchingLexical-only normalization (path.Clean); ; matrix parameters are neither stripped nor rejectedRequest forwardingThe same, unstripped path is forwarded upstream as-isUpstream (Servlet container)Strips ; parameters per segment, <em>then</em> resolves .. — producing an effective path the gateway never saw</p><p>The gateway authenticates and authorizes based on a path that is not the path actually served.</p><h3>Impact</h3><ul><li>Unauthenticated/unauthorized access to routes intended to require strong authentication</li><li>Full bypass of both the authentication <em>and</em> authorization stage for any matched rule — not a partial bypass</li><li>Exploitable on any deployment using the common pattern of a permissive prefix rule (e.g. /public/&lt;.*&gt;) alongside a stricter one (e.g. /admin/&lt;.*&gt;) — a layout the vendor&#39;s own documentation uses as the canonical example</li><li>Conditional on a normalizing upstream (Servlet-based), which is why it scores meaningfully high but slightly below the original raw-path CVE</li></ul><h3>Remediation</h3><ul><li>Strip or reject ;-parameter segments before path normalization, or replicate the upstream&#39;s own normalization behavior before matching</li><li>Re-evaluate access rules against the <em>final forwarded path</em>, not the raw incoming path</li><li>Operator-side mitigation until patched: reject ; in request paths at the edge (WAF/ingress), and avoid prefix-overlapping rule layouts</li></ul><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*tkPaDgbMdk2lynX57DCdng.png" /></figure><p>The lesson here wasn’t “find a new bug” — it was that <strong>a patch closing one normalization dialect doesn’t mean every component agrees on the same dialect.</strong> The original fix correctly killed lexical .. traversal. It just didn&#39;t account for the fact that something <em>downstream</em> parses URLs differently than the component enforcing access control.</p><p>Reading the fix as carefully as the original bug is sometimes the whole finding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08dfe1fd813c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Boolean, One Email Address, One Stolen Identity: Account Takeover via requiresActivation]]></title>
            <link>https://youssefelhosary.medium.com/one-boolean-one-email-address-one-stolen-identity-account-takeover-via-requiresactivation-2c002013460b?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c002013460b</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 12:10:10 GMT</pubDate>
            <atom:updated>2026-10-17T14:00:31.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkCFP0lIZHIak6nsEafFQQ.jpeg" /></figure><p>“وما بكم من نعمة فمن الله”</p><p>I’m HOSARY, a Security Researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and responsibly disclosing security vulnerabilities while continuously improving my offensive security skills. This write-up is about a case where a single client-supplied boolean let me walk away with a fully authenticated session on an account tied to an email address I didn’t own.</p><pre>Disclaimer: All program names, asset identifiers, and sensitive details have been generalized for responsible disclosure purposes. This report was submitted to a private bug bounty program and is not publicly attributable.</pre><h3>Summary</h3><p>A registration endpoint accepted a client-controlled boolean field inside the JSON request body that determined whether a new account required email activation before use. Registering with <em>any</em> email address — including one I did not own or control — and setting that single flag to false caused the backend to skip ownership verification entirely and immediately hand back a fully valid, ready-to-use access token and refresh token, bound to an account carrying that email.</p><p>In other words: this wasn’t just a verification bypass. It was a direct path to taking over the identity tied to any email address I chose, before its real owner ever got the chance to register it themselves.</p><h3>Step 1 — Watching the Normal Flow First</h3><p>Before touching anything, I ran through registration normally and intercepted the request with a proxy. The default request body included a field that looked like an internal flag rather than user input — the kind of thing you usually only see in request bodies if someone forgot to move it server-side:</p><pre>&quot;requiresActivation&quot;: true</pre><p>With this set to true, the expected behavior was clear from the product&#39;s own UX: send a confirmation email, and withhold full account access until the link is clicked.</p><h3>Step 2 — The Obvious Question</h3><p>Any time a security-relevant decision shows up as a plain field in a client-supplied JSON body, the first thing worth testing is: what happens if I just… change it?</p><p>diff</p><pre>- &quot;requiresActivation&quot;: true<br>+ &quot;requiresActivation&quot;: false</pre><p>But the more important question came right after: if this flag really does skip verification, what does it mean for the <em>email address</em> field sitting right next to it? Email verification exists specifically to prove the registrant controls that inbox. If the verification step can be skipped, the email field stops being “prove you own this” and becomes “claim whatever you want.”</p><h3>Step 3 — Registering Into an Identity I Didn’t Own</h3><p>For the proof of concept, I used a test inbox I controlled, to keep the test ethical and contained — but the request accepts <em>any</em> syntactically valid email address, including one belonging to someone else entirely. Everything else in the payload stayed identical — password, name, locale, chosen by the attacker, not the victim. Only the one boolean changed.</p><p>json</p><pre>{<br>  &quot;communityId&quot;: &quot;REDACTED&quot;,<br>  &quot;domain&quot;: &quot;REDACTED&quot;,<br>  &quot;emailAddress&quot;: &quot;[REDACTED-TEST-EMAIL]&quot;,<br>  &quot;password&quot;: &quot;[REDACTED]&quot;,<br>  &quot;locale&quot;: &quot;en-SA&quot;,<br>  &quot;firstName&quot;: &quot;[REDACTED]&quot;,<br>  &quot;marketingOptions&quot;: [],<br>  &quot;requiresActivation&quot;: false,<br>  &quot;redirect&quot;: null,<br>  &quot;lastName&quot;: &quot;[REDACTED]&quot;,<br>  &quot;postCode&quot;: &quot;REDACTED&quot;<br>}</pre><h3>Step 4 — The Response</h3><p>The server responded 200 OK, created the account, and — critically — handed back a complete, usable authenticated session immediately:</p><pre>HTTP/2 200 OK<br>Content-Type: application/json; charset=utf-8</pre><pre>{<br>  &quot;resultCode&quot;: 1,<br>  &quot;membershipGuid&quot;: &quot;[REDACTED]&quot;,<br>  &quot;communityMemberId&quot;: [REDACTED],<br>  &quot;accessToken&quot;: &quot;[REDACTED JWT — valid bearer token]&quot;,<br>  &quot;refreshToken&quot;: &quot;[REDACTED JWT — long-lived, ~90 day expiry]&quot;,<br>  &quot;tokenType&quot;: &quot;bearer&quot;,<br>  &quot;expiresIn&quot;: &quot;14400&quot;<br>}</pre><p>No email was sent. No confirmation link was clicked. No OTP, no CAPTCHA, no secondary check of any kind. Just a modified boolean — and a fully authenticated session bound to an identity the registrant never had to prove they owned.</p><p>This is the moment the finding actually becomes a takeover, not just a bypass: the accessToken and refreshToken in that response are real, usable credentials. Saving them is the entire attack. There&#39;s no second step, no privilege escalation, no further exploitation needed — whoever holds that token pair holds the account, indefinitely, for as long as the tokens remain valid.</p><h3>Step 5 — Coming Back to It: The Session Doesn’t Care What the Victim Does Next</h3><p>I didn’t stop at the initial response. A few days after the first finding, I came back to retest the same flow — partly to confirm reproducibility, partly because one question was nagging at me: <em>if the real owner ever reclaims this account and changes the password, does my stolen session get killed?</em></p><p>It didn’t.</p><p>I held on to the refreshToken from the original takeover and kept using it to mint fresh accessTokens well after the initial registration — including after changing the account&#39;s password through the normal account-settings flow, as the &quot;legitimate&quot; path a real owner regaining control would take. The refresh endpoint kept honoring the old token and kept returning valid, working access tokens in the response, completely unaffected by the password change.</p><p>That’s the part that pushes this past a one-time bypass: possession of the token pair <em>is</em> persistent possession of the account. A password reset — the standard remediation step any victim or support team would reach for first — does nothing to evict an attacker who already captured a session. The only way to cut them off is revoking the refresh token itself, and nothing in the normal user-facing flow does that.</p><h3>Step 6 — What This Means as an Account Takeover, Not Just a Bypass</h3><p>Walking through the attacker’s position made the severity clear:</p><ol><li>Pick a target’s email address — one they haven’t registered on the platform yet, or even one they have, depending on how account/email uniqueness is enforced.</li><li>Register with that email and requiresActivation: false.</li><li>Receive a live, bearer-authenticated session for an account now permanently associated with the victim’s email — without the victim ever seeing a confirmation email, because none was sent.</li><li>The victim, if they later try to register or recover that address, now finds it already claimed — by the attacker’s account, under the attacker’s password.</li></ol><p>This is account takeover in the purest sense: the attacker ends up holding valid, long-lived credentials for an identity tied to someone else’s email, and the legitimate owner is locked out of ever establishing that identity themselves. No password guessing, no phishing, no session hijacking of an <em>existing</em> account — just claiming the identity before the real owner does, using a verification step that was advertised but never actually enforced.</p><p>I verified the contrast directly: with requiresActivation: true left untouched, attempting to log in before clicking the activation link correctly blocked access — confirming the activation gate is real and does normally matter when the client doesn&#39;t choose to turn it off.</p><h3>Root Cause</h3><p>Two separate issues compound each other here:</p><ol><li>A value that represents internal business/security policy — <em>should this account require verification before use?</em> — was accepted as client input instead of being decided entirely server-side. The backend trusted the client to self-report whether the identity it was claiming deserved a security control.</li><li>The refresh token issued at registration is not invalidated when the account’s password changes. Credential rotation, the standard recovery step, does not revoke sessions that were already issued.</li></ol><p>Individually, either one is a real finding. Together, they turn a verification bypass into a takeover the victim cannot self-remediate.</p><h3>Impact</h3><ul><li><strong>Direct account takeover.</strong> An attacker can claim an account tied to any email address — including one they don’t own — and receive a fully authenticated, usable session for it immediately, with no proof of ownership required.</li><li><strong>Persistent, password-change-resistant access.</strong> Because the refresh token survives a password change, capturing it at registration time grants effectively indefinite access. The victim’s normal recovery action — resetting the password — does not evict the attacker.</li><li><strong>Pre-emptive identity squatting.</strong> Because the attacker’s account becomes the one of record for that email, the real owner can be blocked from ever completing their own registration, or from recovering an account that technically belongs to someone else.</li><li><strong>Full bearer credentials issued with zero ownership proof.</strong> Most platforms with this class of bug at least withhold session tokens until verification. Here, both access and long-lived (~90 day) refresh tokens were issued at registration time regardless of verification state.</li><li><strong>Trivially automatable at scale.</strong> A single modified JSON field, no CAPTCHA or OTP in the flow — this scales to bulk, unattended account takeover across the platform with no real friction.</li></ul><h3>Remediation</h3><ul><li>Remove client control over activation requirements entirely. This must be determined server-side from business policy, never trusted from request input — and if the field has to stay in the schema for compatibility, the backend should ignore or override it.</li><li>Don’t issue access/refresh tokens until verification is actually complete. Return a “pending verification” state and issue the session only after the confirmation step succeeds.</li><li>Invalidate all existing refresh tokens whenever the account password changes. This closes the window entirely even if a session was issued improperly, and is standard practice specifically because it’s the only reliable way to cut off a session an attacker already holds.</li></ul><h3>Conclusion</h3><p>This wasn’t a complex exploit chain — it was one field, changed once, and the difference between “verification bypass” and “account takeover” was really just a matter of whose email address you type in. The lesson is a familiar one that’s still worth repeating: if a security decision is representable as a client-controlled value, assume someone will control it — and when that decision gates <em>identity ownership</em>, the blast radius isn’t just “unverified accounts,” it’s every email address on the internet the attacker chooses to claim.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c002013460b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“When SQL Injection Failed, Firebase Handed Me the Whole Database”]]></title>
            <link>https://youssefelhosary.medium.com/when-sql-injection-failed-firebase-handed-me-the-whole-database-6118ad3a6d8d?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/6118ad3a6d8d</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 08:36:39 GMT</pubDate>
            <atom:updated>2026-08-04T08:36:39.246Z</atom:updated>
            <content:encoded><![CDATA[<h3>When SQL Injection Failed, Firebase Handed Me the Whole Database</h3><p><em>“وما بكم من نعمة فمن الله”</em></p><p>I’m <strong>Youssef El-Hosary</strong>, a Security Researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and responsibly disclosing security vulnerabilities while continuously improving my offensive security skills. Every target teaches me something new, and this write-up is about one of those moments where changing my mindset led to discovering a completely different vulnerability than the one I was originally looking for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuhCMZVbucdl5BGhr1lQjg.png" /></figure><blockquote><strong><em>Disclaimer:</em></strong><em> All domains, endpoints, identifiers, and sensitive information have been replaced with </em><strong><em>HOSARY</em></strong><em> for responsible disclosure purposes.</em></blockquote><h3>Summary</h3><p>While testing a <strong>HOSARY</strong> subdomain, I discovered that the application relied on a <strong>Firebase Realtime Database</strong> with overly permissive security rules.</p><p>Instead of finding a traditional vulnerability such as SQL Injection or an access control issue, I was able to access large portions of the application’s database directly through the Firebase REST API without authentication.</p><p>The exposed data included user-created game information, usernames, emails, metadata, and internal game templates.</p><h3>Step 1 — Initial Recon</h3><p>The target was a simple subdomain where users could create small games.</p><p>The homepage displayed around ten games created by other users, so I started with the usual testing:</p><ul><li>Testing payloads inside the game name</li><li>Looking for access control issues</li><li>Reviewing HTTP requests</li></ul><p>Nothing interesting appeared.</p><h3>Step 2 — Something Didn’t Feel Right</h3><p>While reviewing the application’s requests, I noticed something unusual: each game contained much more data than what was visible in the interface. For example:</p><ul><li>Username</li><li>Email</li><li>Game metadata</li><li>Internal references</li></ul><p>At this point, I assumed there might be an access control issue exposing backend data. I spent some time testing different authorization scenarios.</p><p>Everything failed.</p><h3>Step 3 — Wrong Direction</h3><p>After failing to find any access control issue, I switched to testing SQL Injection. I tried multiple payloads across different inputs and requests.</p><p>Again… nothing.</p><p>Instead of continuing to throw payloads randomly, I decided to step back and understand the application’s technology stack first.</p><h3>Step 4 — Identifying the Database</h3><p>Using <strong>Wappalyzer</strong>, I identified that the application was using a <strong>Firebase Realtime Database</strong>.</p><p>That completely changed my approach. Instead of attacking inputs, I started investigating Firebase itself.</p><h3>Step 5 — Finding the Firebase Endpoint</h3><p>After testing several Firebase URL formats, I reached an endpoint similar to:</p><pre>https://hosary-games.firebaseio.com/games.json</pre><p>The first request returned an error. I then switched to curl:</p><pre>curl -s &quot;https://hosary-games.firebaseio.com/games.json&quot;</pre><p>The request kept loading for a long time — a sign that the database was much larger than expected.</p><h3>Step 6 — Using Firebase Pagination</h3><p>Instead of requesting the entire database, I requested only the first ten records:</p><pre>curl -s &quot;https://hosary-games.firebaseio.com/games.json?orderBy=%22%24key%22&amp;limitToFirst=10&quot;</pre><p>This time the request succeeded. The response contained detailed information about multiple games, including:</p><ul><li>Usernames</li><li>Emails</li><li>Game metadata</li><li>Internal references</li><li>Asset information</li></ul><p>Example (truncated):</p><pre>{<br>  &quot;-ExampleKey&quot;: {<br>    &quot;name&quot;: &quot;Example Game&quot;,<br>    &quot;created_timestamp&quot;: 1648334188397,<br>    &quot;orientation&quot;: &quot;portrait&quot;,<br>    &quot;assets&quot;: {<br>      &quot;1hero&quot;: &quot;...&quot;,<br>      &quot;2enemy&quot;: &quot;...&quot;,<br>      &quot;3goal&quot;: &quot;...&quot;<br>    },<br>    &quot;sfx&quot;: {<br>      &quot;launch_player&quot;: &quot;...&quot;,<br>      &quot;win_sound&quot;: &quot;...&quot;<br>    }<br>  }<br>}</pre><p>The endpoint also supported Firebase pagination parameters such as limitToFirst and startAt, making it possible to enumerate the exposed data across multiple requests.</p><h3>Step 7 — Estimating the Exposure</h3><p>To estimate the amount of exposed data, I downloaded the response:</p><pre>curl -o games.json &quot;https://hosary-games.firebaseio.com/games.json&quot;</pre><p>The resulting file was approximately <strong>70 MB</strong>, confirming that the games database for this application was publicly accessible.</p><h3>Step 8 — Discovering Another Endpoint</h3><p>While reviewing additional requests, I noticed another endpoint:</p><pre>/templates.json</pre><p>Replacing games with templates returned another dataset:</p><pre>curl -s &quot;https://hosary-games.firebaseio.com/templates.json&quot;</pre><p>The response size was approximately <strong>3 MB</strong>, containing both public and internal game templates and exposing additional implementation details.</p><h3>Step 9 — Verifying Write Permissions</h3><p>To determine whether the issue affected only read access or also allowed writes, I performed a safe validation against a temporary test path:</p><pre>curl -s -X PATCH &quot;https://hosary-games.firebaseio.com/test_write.json&quot; \<br>-d &#39;{&quot;test&quot;:&quot;poc&quot;}&#39;</pre><p>The server responded with:</p><pre>Permission denied.</pre><p>This confirmed that <strong>write access was properly restricted</strong>, and no application data was modified during testing.</p><h3>Root Cause</h3><p>The vulnerability was caused by overly permissive <strong>Firebase Realtime Database security rules</strong>. Anonymous users could access database contents directly through the Firebase REST API without any authentication.</p><h3>Impact</h3><ul><li>Unauthenticated access to Firebase Realtime Database</li><li>Disclosure of user-generated game information</li><li>Exposure of usernames and email addresses</li><li>Exposure of application metadata</li><li>Disclosure of internal game templates</li><li>Increased attack surface through leaked implementation details</li></ul><h3>Conclusion</h3><p>This finding reminded me that not every valuable vulnerability comes from SQL Injection or XSS. Sometimes, taking one step back, identifying the underlying technology, and understanding how it works can reveal far more impactful security issues than any payload ever could.</p><p>Understanding the technology stack was the key that turned an uninteresting subdomain into a valid security finding.</p><p>Linkedin : <a href="https://www.linkedin.com/in/youssef-elhosary-9864b2292/">https://www.linkedin.com/in/youssef-elhosary-9864b2292/</a></p><p>Facebook : <a href="https://www.facebook.com/youssef.elhosary.199900">https://www.facebook.com/youssef.elhosary.199900</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6118ad3a6d8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improper Access Control Allows Unauthorized Organization Access]]></title>
            <link>https://youssefelhosary.medium.com/improper-access-control-allows-unauthorized-organization-access-e2f9c1fb2f53?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2f9c1fb2f53</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 15:00:00 GMT</pubDate>
            <atom:updated>2026-02-14T15:00:00.364Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*cCVcq8tJeYe4Y-w4.jpg" /></figure><h3>Introduction:</h3><p>“وما بكم من نعمة فمن الله”</p><p>I’m 𝐘𝐨𝐮𝐬𝐬𝐞𝐟 𝐄𝐥-𝐇𝐨𝐬𝐚𝐫𝐲, a security researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and reporting vulnerabilities to help make applications safer, while continuously improving my skills and learning new attack and defense techniques. I’m always eager to grow and share my journey with the security community</p><h3>Summary</h3><p>In this report, I’m documenting an <strong>Improper Access Control vulnerability</strong> affecting an organization invitation workflow.<br>The issue allows generating <strong>unlimited valid invitation tokens</strong> and <strong>using them with any authenticated account</strong>, leading to unauthorized organization <strong>access and bypass</strong> of the intended access‑control logic.Although invitation tokens are supposed to be tied to specific email addresses, they were not enforced on the backend, allowing attackers to reuse them freely.</p><h3>Steps:</h3><ol><li>I opened the <strong>Invite Member</strong> feature in the dashboard to explore how it works.</li><li>I noticed that the emails being added could be changed easily, so I decided to try adding arbitrary and repeated email addresses.</li><li>I repeated the process several times to see if there was any limit — the system kept generating new invitation tokens without any restrictions.</li><li>To verify, I logged in with a completely different account and tried using one of the generated tokens. Surprisingly, it worked, and the account was added to the organization even though it <strong>was never actually invited.</strong></li><li>From this experiment, it became clear that the system did not enforce any binding between the token and the intended email, allowing access control to be bypassed.</li></ol><h3>Impact</h3><ul><li>Unauthorized access to organizations.</li><li>Bypass of invitation access controls.</li><li>Potential privilege escalation depending on role permissions.</li><li>Possibility of mass invitation abuse.</li></ul><h3>Conclusion</h3><p>This vulnerability demonstrates how missing validation and rate‑limiting in invitation workflows can lead to access‑control bypass and unauthorized organization membership.</p><p>Proper binding between invitation tokens and the intended email address is essential to prevent this type of abuse.</p><p>The issue was responsibly reported to the company through their bug bounty program and was successfully reviewed and accepted by the security team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2f9c1fb2f53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 3-  ]]></title>
            <link>https://youssefelhosary.medium.com/3-533c01f8a019?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/533c01f8a019</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Sat, 15 Nov 2025 19:29:22 GMT</pubDate>
            <atom:updated>2025-11-15T19:35:33.527Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rChNfXaA2zEqF5vCU59zg.png" /></figure><h3>I’m 𝐘𝐨𝐮𝐬𝐬𝐞𝐟 𝐄𝐥-𝐇𝐨𝐬𝐚𝐫𝐲, a security researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and reporting vulnerabilities to help make applications safer, while continuously improving my skills and learning new attack and defense techniques. I’m always eager to grow and share my journey with the security community</h3><h3>Overview of the 3-Bug Business Logic with my frind:</h3><ul><li>In this report, I’m documenting a set of three critical logic flaws that I call “The 3-Bug Business Logic”.</li><li>These issues — related to role-change flows, resource-creation limits, and secret generation — allow bypasses through concurrent requests, leading to unintended destructive behavior, limit-evasion, and secret over-generation. Despite being separate issues, all three share one root cause: business logic flaws when handling concurrent requests. The end result? Complete project deletion, resource-spamming, and uncontrolled secret proliferation — each carrying severe business and security impact.</li></ul><h3>Bug #1</h3><h3>Summary:</h3><p>A bypass in the role-change flow allowed me to remove every admin and leave the project inaccessible. When affected users log back in they are treated as new users with no link to the previous project — effectively destroying access and traceability from the app UI.</p><h3>Steps:</h3><p>1-Observe that the UI blocks deleting the last admin (deleting the final admin would remove the project).<br>2-Capture the requests used to delete members (save the deletion requests).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*ZBkNMJrI3j6J5HbM.png" /></figure><p>3. In Burp, use the saved requests and send them simultaneously (replay the saved deletion requests together).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/0*kG0goQKvFSz70B0-.png" /></figure><p>4. The result: the last admin was removed and the project ceased to exist in the application UI — users are treated as new and cannot access the old project.</p><p>5. After this, when any admin logs in they are asked to <strong>create a new project from scratch</strong> — indicating the previous project no longer exists in the UI.</p><h3>Impact:</h3><ul><li><strong>Complete loss of project access and data traceability</strong> for all members through the application UI.</li><li><strong>No recovery path available</strong> — affected users are treated as new upon re-login.</li><li><strong>High risk from insider abuse or compromised admin accounts</strong>, as destructive actions can be performed without any owner oversight.</li><li><strong>Severe business impact</strong>, including potential loss of configurations, API keys, and audit logs.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — —</p><h3>Bug #2</h3><h3>Summary</h3><p>While I was browsing the website, I found an icon to create a new application. That gave me the idea to check the maximum number of applications that can be created. I found out that the limit is 20 applications per account. Then I thought of trying to find a way to bypass that limit.</p><h3>Steps</h3><ul><li><em>At first I found that it can create an application, and I searched until I discovered that its limit is 20 applications.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*uNa8ohjXaDvu3caX.png" /></figure><ul><li><strong>Attempted to bypass the limit</strong></li><li>Opened <strong>Burp Suite</strong> and intercepted the request for creating a new application.</li><li><strong>Modified the request</strong></li><li>Forwarded the intercepted request to <strong>Repeater</strong> for manual testing.</li><li><strong>Tried multiple payloads/requests</strong></li><li>Sent the request to <strong>Turbo Intruder</strong> in order to test different scenarios and check if the limit could be bypassed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*1zeWGcYWeAzbL1U4.png" /></figure><h3>Impact</h3><ul><li>Resource exhaustion or storage/database proliferation.</li><li>Evasion of rate/feature limits intended to prevent abuse.</li><li>Potential creation of many application entries that could be used for automated abuse (API key issuance, callback endpoints, etc.), depending on the product’s permission model.</li><li>The exact business impact depends on whether newly created applications automatically receive credentials or privileged configuration.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — —</p><h3>Bug #3</h3><h3>Summary</h3><p>I discovered a way to bypass the intended limit of 5 App secrets per application by sending multiple concurrent secret-creation requests. This results in more than 5 valid secrets being generated and remaining functional.</p><h3>Steps</h3><ol><li>Open the application’s secrets page where the maximum limit (5) is displayed.</li></ol><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*SaT8c3ymA3RD6zXz.png" /></figure><p>2. Initiate the creation of a new secret and intercept the outgoing request. <br>3. Replay that same request multiple times *simultaneously* using a tool capable of sending parallel requests. <br>4. Check the secrets list or query the API/DB — you’ll notice that the system creates more secrets than allowed.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/0*YKfSLhFmSfbJxWkk.png" /></figure><h3>Impact</h3><p>1. An attacker can create more than the allowed number of App secrets. <br>2. This weakens the intended security boundary around secret management. <br>3. Each extra secret remains active and usable, increasing the attack surface. <br>4. More secrets to rotate/revoke if one is leaked. <br>5. Potential abuse for automation or API exploitation using extra credentials. <br>6. Increased operational overhead and risk of misconfiguration.</p><p>########</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/0*FoXt8ZYftSE1Opg4.png" /></figure><h3>And that’s it, folks! I hope this write-up offers you valuable insights. Thank you for taking the time to read. If you have any thoughts or questions, please feel free to share them in the comments section.<br>Thank you again, and happy bug hunting!</h3><h3>“This report has been successfully accepted by hackerone.”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/0*ANt2aVOYeYmziWoz.png" /></figure><p>𝐌𝐲 𝐋𝐢𝐧𝐤𝐞din: https://www.linkedin.com/in/youssef-elhosary-9864b2292</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=533c01f8a019" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business Logic Errors Unauthorized Project Deletion Vulnerability]]></title>
            <link>https://youssefelhosary.medium.com/business-logic-errors-unauthorized-project-deletion-vulnerability-43083d20e4f3?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/43083d20e4f3</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 10:14:20 GMT</pubDate>
            <atom:updated>2025-10-23T10:14:20.556Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rChNfXaA2zEqF5vCU59zg.png" /></figure><h3>Introduction:</h3><p>“وما بكم من نعمة فمن الله”</p><p>I’m 𝐘𝐨𝐮𝐬𝐬𝐞𝐟 𝐄𝐥-𝐇𝐨𝐬𝐚𝐫𝐲, a security researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and reporting vulnerabilities to help make applications safer, while continuously improving my skills and learning new attack and defense techniques. I’m always eager to grow and share my journey with the security community</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Summary</h3><p>A bypass in the role-change flow allowed me to remove every admin and leave the project inaccessible. When affected users log back in they are treated as new users with no link to the previous project — effectively destroying access and traceability from the app UI.</p><h3>Steps</h3><ol><li>Observe that the UI blocks deleting the last admin (deleting the final admin would remove the project).</li><li>Capture the requests used to delete members (save the deletion requests).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cxwkju8sxSlPxuC40LLKLQ.png" /></figure><p>3. In Burp, use the saved requests and send them simultaneously (replay the saved deletion requests together).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*PGGmwQeHy4GKnQG3TvuWjg.png" /></figure><p>4. The result: the last admin was removed and the project ceased to exist in the application UI — users are treated as new and cannot access the old project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*e7jQ27nLf2KWihC0xZwY8w.png" /></figure><p>5.. After this, when any admin logs in they are asked to <strong>create a new project from scratch</strong> — indicating the previous project no longer exists in the UI.</p><h3>Impact</h3><ul><li><strong>Complete loss of project access and data traceability</strong> for all members through the application UI.</li><li><strong>No recovery path available</strong> — affected users are treated as new upon re-login.</li><li><strong>High risk from insider abuse or compromised admin accounts</strong>, as destructive actions can be performed without any owner oversight.</li><li><strong>Severe business impact</strong>, including potential loss of configurations, API keys, and audit logs.</li></ul><h3>Conclusion</h3><p>This finding demonstrates how a small logic flaw in role and permission handling can lead to a <strong>high-impact vulnerability</strong> affecting the integrity and continuity of an entire system. The ability to remove the last admin and cause a full project deletion shows how critical proper server-side validation and ownership control are.</p><p>I submitted the report responsibly through the bounty program. Even though every finding doesn’t end with a bounty, <strong>Alhamdulillah always</strong> — it was a valuable learning experience that improved my understanding of business logic flaws and strengthened my approach to responsible disclosure and professional reporting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43083d20e4f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Application Creation Limits — Lessons from a Responsible Disclosure]]></title>
            <link>https://youssefelhosary.medium.com/bypassing-application-creation-limits-lessons-from-a-responsible-disclosure-08a4ba86c282?source=rss-cec0191eb112------2</link>
            <guid isPermaLink="false">https://medium.com/p/08a4ba86c282</guid>
            <dc:creator><![CDATA[Youssef elhosary]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 12:15:41 GMT</pubDate>
            <atom:updated>2025-09-29T14:55:27.530Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bypassing Application Creation Limits — Lessons from a Responsible Disclosure</h3><h3>Introduction</h3><p>“وما بكم من نعمة فمن الله”</p><p>I’m 𝐘𝐨𝐮𝐬𝐬𝐞𝐟 𝐄𝐥-𝐇𝐨𝐬𝐚𝐫𝐲, a security researcher passionate about cybersecurity and bug bounty hunting. I enjoy discovering and reporting vulnerabilities to help make applications safer, while continuously improving my skills and learning new attack and defense techniques. I’m always eager to grow and share my journey with the security community</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —In the world of Bug Bounty and penetration testing, sometimes the most impactful vulnerabilities come from overlooked business logic flaws rather than complex exploits. In this writeup, I share my experience with a recent finding related to <strong>application creation quota enforcement</strong>, how it was reported responsibly, and what I learned from the process</p><h3>Summary</h3><p>While I was browsing the website, I found an icon to create a new application. That gave me the idea to check the maximum number of applications that can be created. I found out that the limit is 20 applications per account. Then I thought of trying to find a way to bypass that limit.</p><h3>Reproduction Steps</h3><blockquote>At first I found that it can create an application, and I searched until I discovered that its limit is 20 applications.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*K_GKBD-TDOh2qvJpMIbXJg.png" /></figure><ul><li><strong>Attempted to bypass the limit</strong></li><li>Opened <strong>Burp Suite</strong> and intercepted the request for creating a new application.</li><li><strong>Modified the request</strong></li><li>Forwarded the intercepted request to <strong>Repeater</strong> for manual testing.</li><li><strong>Tried multiple payloads/requests</strong></li><li>Sent the request to <strong>Turbo Intruder</strong> in order to test different scenarios and check if the limit could be bypassed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wdl4uDSDpJ5Ueg3r7lZ3A.png" /></figure><h3>Impact</h3><ul><li>Resource exhaustion or storage/database proliferation.</li><li>Evasion of rate/feature limits intended to prevent abuse.</li><li>Potential creation of many application entries that could be used for automated abuse (API key issuance, callback endpoints, etc.), depending on the product’s permission model.</li><li>The exact business impact depends on whether newly created applications automatically receive credentials or privileged configuration.</li></ul><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*8UYt6Rykx3QTA0BpylN5XQ.png" /></figure><p>This case illustrates how something as simple as missing quota enforcement can have high-severity consequences (8.8 CVSS). I submitted the report on HackerOne, but since not all endings are happy, it was unfortunately marked as a duplicate because another hacker had reported it 14 hours before me. Alhamdulillah always — I still learned a lot from the experience, and it strengthened my skills in both vulnerability discovery and professional reporting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08a4ba86c282" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>