<?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 h4nin on Medium]]></title>
        <description><![CDATA[Stories by h4nin on Medium]]></description>
        <link>https://medium.com/@haninalmohammadi19?source=rss-6069698c2593------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8rXwqt-A6a5bNWzW-X_Kyg.jpeg</url>
            <title>Stories by h4nin on Medium</title>
            <link>https://medium.com/@haninalmohammadi19?source=rss-6069698c2593------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:16:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haninalmohammadi19/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[Breaking LLM Output Handling: How I Found an Open Redirect on a Major AI Platform]]></title>
            <link>https://medium.com/@haninalmohammadi19/breaking-llm-output-handling-how-i-found-an-open-redirect-on-a-major-ai-platform-4c4c9ac56f0c?source=rss-6069698c2593------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c4c9ac56f0c</guid>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[open-redirect]]></category>
            <dc:creator><![CDATA[h4nin]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 12:31:01 GMT</pubDate>
            <atom:updated>2026-07-10T12:31:01.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQLTtoqjOvfHiMenaaG9Tg.png" /></figure><h3>The Core Concept</h3><p>We all use AI chatbots every day. To make sharing easier, these platforms have a “Shared Conversations” feature. It basically lets you create a public link to your chat so anyone can read it.</p><p>But while I was learning about AI security, a cool question popped into my head: <em>What happens if the AI generates a malicious SVG image, and someone opens it through that shared link?</em></p><p>By combining three simple web tricks, I found an <strong>Open Redirect</strong> bug. The triage team accepted it as a <strong>P3</strong> issue under the <strong>LLM Output Handling</strong> category.</p><h3>🛠️ The Exploit Chain: How I Built It</h3><p>To make the redirection work, I didn’t just paste a normal link. I wrote a specific prompt asking the chatbot to generate an SVG code with a hidden trick inside it.</p><p>Here is the exact code I used:</p><p>HTML</p><pre>&lt;svg width=&quot;500&quot; height=&quot;200&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;<br>  &lt;foreignObject width=&quot;500&quot; height=&quot;200&quot;&gt;<br>    &lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;font-size:24px; color:white; text-align:center; margin-top:50px;&quot;&gt;<br>      Click Edit =&gt; Preview<br>    &lt;/div&gt;<br>    &lt;iframe xmlns=&quot;http://www.w3.org/1999/xhtml&quot; src=&quot;javascript:window.open(&#39;https://external-site.com&#39;, &#39;_blank&#39;, &#39;width=600,height=400&#39;)&quot; width=&quot;400&quot; height=&quot;250&quot; style=&quot;opacity:0; position:absolute;&quot;/&gt;<br>  &lt;/foreignObject&gt;<br>&lt;/svg&gt;</pre><h3>How I Thought About It:</h3><ul><li><strong>The </strong><strong>&lt;foreignObject&gt; Tag:</strong> I chose this tag because it lets you drop normal HTML right inside an SVG image.</li><li><strong>The Invisible </strong><strong>&lt;iframe&gt;:</strong> Inside that HTML block, I put an iframe and set its opacity to 0. This keeps it completely hidden from the user&#39;s eyes.</li><li><strong>The </strong><strong>javascript: URI:</strong> Instead of a regular website link, I put a javascript:window.open(...) command inside the hidden iframe, pointing to an external site.</li></ul><p>Once the chatbot gave me the code, I clicked <strong>Share</strong> to get the public link.</p><p>To test it, I opened that link in a new Microsoft Edge window. When you click <strong>Edit</strong> and then click <strong>Preview</strong>, the website tries to show the SVG image. Because it didn’t clean or filter the hidden tags during this preview step, the browser ran my hidden script and automatically opened a popup window to the external site.</p><h3>🏁 The Result</h3><p>I reported the bug, and the team quickly validated it as a <strong>P3</strong> under <strong>AI Application Security &gt; LLM Output Handling</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQqszhtNNKjyChHSApPe5w.png" /></figure><p>But in bug hunting, timing is everything. It turned out another researcher found a similar SVG trick just a few weeks before me, so my report was marked as a <strong>Duplicate</strong>.</p><p>Even though there was no bounty this time, finding a P3 bug in a huge AI system all by myself felt like a great win. It showed me that as AI tools add more visual features, output handling is going to be a huge area for security bugs.</p><p><em>Thanks for reading!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c4c9ac56f0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From PortSwigger Labs to my First Real-World Bounty: How a Stored XSS Found Me]]></title>
            <link>https://medium.com/@haninalmohammadi19/from-portswigger-labs-to-my-first-real-world-bounty-how-a-stored-xss-found-me-4211f2ed3ce9?source=rss-6069698c2593------2</link>
            <guid isPermaLink="false">https://medium.com/p/4211f2ed3ce9</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[my-first-bounty]]></category>
            <category><![CDATA[xss-vulnerability]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[h4nin]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 09:31:00 GMT</pubDate>
            <atom:updated>2026-07-10T09:31:00.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqmQAV6RIk0LaMLQBsFtOQ.png" /></figure><h3>The Plot Twist in My Study Routine</h3><p>It was a regular day of studying web security. I was deeply focused, solving hands-on challenges on <strong>PortSwigger Web Security Academy</strong>, trying to master Cross-Site Scripting (XSS). Like any good student, I had a popular note-taking and productivity app open on the side, where I was documenting my notes, payloads, and observations.</p><p>Then, something strange happened.</p><p>I generated the public link to share it with my friends so they could benefit from my notes, just like I always do. But as soon as the page loaded, my screen suddenly popped up with multiple JavaScript alert() boxes!</p><p>I blinked. I wasn’t on PortSwigger’s sandbox anymore. I was looking at a live, real-world application executing my test code.</p><p>As the title of this article suggests, I had just <strong>found</strong> my very first real-world vulnerability.</p><h3>Channeling My Inner Detective: The Bug Chose Me</h3><p>In the bug hunting world, people spend hours scanning targets. But in this case, as a true beginner at that moment, <strong>the bug chose me — I didn’t go looking for it.</strong></p><p>Once the shock wore off, I immediately switched into detective mode. My very first step wasn’t even about looking at the code — I just needed to check if this platform had a Bug Bounty or a responsible disclosure program. Fortunately, they did! Knowing that they welcome security reports gave me a huge green light and the motivation I needed to dig deeper.</p><h3>Breaking Down the Code: Why Did it Trigger?</h3><p>To find out exactly why this was happening, I didn’t just guess or throw random payloads. I opened the browser’s developer tools to look closely at the source code of the page. I needed to see how the website was handling my text.</p><p>When I inspected the code, I saw something interesting. The website was taking my notes and dropping them right into an HTML block that was already filled with other scripts.</p><p>The main problem was <strong>the context</strong>. The website treated my input as if it were part of its own code, not just plain text. It didn’t properly “clean” or escape the characters.</p><p>To make my code run, I had to logically break out of the website’s existing code context. After mapping out how the tags were nested, I made a very specific payload to manually close their open sections first:</p><p>HTML</p><pre>&lt;/script&gt;<br>&lt;/script&gt;&lt;script&gt;alert(0)&lt;/script&gt;</pre><h3>Here is how the browser read the payload:</h3><ul><li><strong>The First two </strong><strong>&lt;/script&gt; tags:</strong> These forced the browser to close the website&#39;s internal script blocks early. This changed the rules; the browser now thought it was back in the main HTML body, not inside a script.</li><li><strong>The New </strong><strong>&lt;script&gt; tag:</strong> Because I had cleared the way, the browser now saw my injected tag as a new, legitimate command.</li><li><strong>Execution:</strong> The browser parsed and ran alert(0) immediately.</li></ul><p>This proved that the bug was caused because the application wasn’t properly encoding my data before putting it into a sensitive part of the HTML.</p><p>I packaged my findings, recorded a quick Proof of Concept video, and submitted my very first security report. Within days, the security team validated the findings, triaged the issue, rated it as a Medium Severity, and rewarded me with my first official financial bounty!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*JKnwsEbKpXJ0AZ2u4v59sQ.png" /></figure><h3>The Lessons Learned</h3><p>What started as a simple study session turned into a memorable moment in my cybersecurity journey. It taught me that bugs aren’t always hidden behind crazy systems; sometimes, they are right there in the apps we use every day to take our notes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4211f2ed3ce9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>