<?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 Anjana Manoj on Medium]]></title>
        <description><![CDATA[Stories by Anjana Manoj on Medium]]></description>
        <link>https://medium.com/@anjanamanojbhadra?source=rss-049867c12f9b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jhbmiiLPOruvIH6-0nDlww.png</url>
            <title>Stories by Anjana Manoj on Medium</title>
            <link>https://medium.com/@anjanamanojbhadra?source=rss-049867c12f9b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:20:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anjanamanojbhadra/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[My First CVE: A CSRF Vulnerability in Horilla HRMS (CVE-2026-86066)]]></title>
            <link>https://medium.com/@anjanamanojbhadra/my-first-cve-a-csrf-vulnerability-in-horilla-hrms-cve-2026-86066-dd2024e25b4a?source=rss-049867c12f9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd2024e25b4a</guid>
            <category><![CDATA[cve]]></category>
            <category><![CDATA[cve-2026-86066]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[csrf]]></category>
            <dc:creator><![CDATA[Anjana Manoj]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 11:16:01 GMT</pubDate>
            <atom:updated>2026-09-16T11:16:01.372Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How an unsafe HTTP GET on a state-changing endpoint allowed an attacker to approve attendance records in a logged-in manager’s name: zero-click, fully authenticated, and attributed to the victim in the audit trail.</em></p><h3>Introduction</h3><p>Horilla is a popular open-source Human Resource Management System (HRMS). It offers a full suite of modules covering employees, attendance, leave, payroll, and recruitment, giving organizations a flexible, self-hosted way to run their HR operations.</p><p>This post walks through CVE-2026-86066, my first CVE, a Cross-Site Request Forgery (CSRF) vulnerability I discovered in Horilla HRMS attendance-approval workflow. The root cause is a classic but easy-to-miss anti-pattern performing a state-changing database write over an HTTP GET request with no anti-CSRF protection. Because of how CSRF defenses and browser cookie policies work, that single design decision was enough to let an attacker approve attendance records on behalf of a logged-in manager, with the victim doing nothing more than opening a web page.</p><p>The vulnerability was assigned CVE-2026–86066 and tracked as GHSA-65vj-5p5g-pv5m. It falls under CWE-352 (Cross-Site Request Forgery) and it is fixed in version 2.0.0.</p><h3>A quick primer on CSRF</h3><p>Cross-Site Request Forgery abuses the fact that browsers automatically attach a user’s session cookies to requests aimed at a site, regardless of where the request originated. If a sensitive, state-changing action can be triggered without a secret token that only the legitimate application knows, then any attacker-controlled page can forge that action in the victim’s authenticated session.</p><p>The critical detail for this bug is that frameworks only CSRF-check “unsafe” HTTP methods, namely POST, PUT, PATCH, and DELETE. A GET request is treated as “safe” by convention and is never CSRF-checked. The convention assumes GET requests only read data. The moment a GET request writes data, that assumption breaks, and the built-in protection silently does nothing.</p><p>That is exactly the gap this vulnerability lived in.</p><h3>The vulnerability</h3><p>The affected endpoint is approve_validate_attendance_request.</p><p>python</p><pre>@login_required<br>@manager_can_enter(&quot;attendance.change_attendance&quot;)<br>def approve_validate_attendance_request(request, attendance_id):<br>    ...</pre><p>Two things are notably absent:</p><ol><li>There is no @require_http_methods([&quot;POST&quot;]), so the endpoint responds to GET.</li><li>There is no anti-CSRF token validation.</li></ol><p>Despite being served over GET, the view mutates persistent state the moment it is reached. It:</p><ul><li>sets attendance_validated = True</li><li>sets is_validate_request_approved = True</li><li>clears the pending-request flags</li><li>records approved_by = request.user.employee_get</li><li>commits the change with attendance.save()</li></ul><p>Even more telling, the application itself invokes this endpoint through a plain hyperlink in individual_view.html:</p><p>html</p><pre>&lt;a href=&quot;{% url &#39;approve-validate-attendance-request&#39; attendance.id %}&quot;&gt;</pre><p>That confirms the whole thing. A simple GET navigation is all it takes to approve an attendance request. The endpoint trusts the HTTP method to imply safety while actually using it to mutate data.</p><h3>Root cause analysis</h3><p>Putting the pieces together, the exploit chain becomes clear.</p><p><strong>The action is reachable by GET: </strong>Because the state change happens on a safe method, Django’s CSRF middleware never runs. There is nothing to bypass, because the check simply does not apply.</p><p><strong>No token is required:</strong> An attacker does not need to leak or predict any secret. The only ingredient is the target attendance record’s ID.</p><p><strong>SameSite=Lax does not prevent this: </strong>Modern browsers default session cookies to SameSite=Lax, which blocks cookies on many cross-site requests, but it makes an exception for top-level navigations using safe methods. A forged GET that navigates the whole tab (for example, window.location = ...) is precisely that exception. The session cookie is attached automatically, so the forged request arrives fully authenticated.</p><p>The result is a zero-click attack beyond the victim opening the attacker’s page. Any malicious site, email link, or embedded resource that triggers a top-level navigation to the endpoint will silently approve the request. Because the server sees the victim’s session, the approval is committed with the victim’s privileges and attributed to them.</p><h3>Proof of concept</h3><p>The exploit needs only a target attendance ID and a logged-in manager who can be lured into opening a page.</p><p><strong>Step 1: Identify a pending request.</strong> Log in as a manager, open Attendance Requests, go to the Not verified tab, and select an employee’s pending request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Szhw2n6rxkoKF0T4w_98ew.png" /></figure><p><strong>Step 2: Capture the record ID.</strong> Intercept the request (for example, in Burp) and note the numeric attendance ID used by the approval endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZ8i5o4AHd2hzHhgG3hxrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNnUjyEvK-1v8t-wDLO5Xw.png" /></figure><p><strong>Step 3: Craft the CSRF payload.</strong> A minimal HTML page that performs a top-level navigation to the endpoint is enough:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*nvu69UWhPumBV_gL4I4o4Q.png" /></figure><p><strong>Step 4: Trigger it.</strong> Open the file in a browser where a manager is authenticated. The tab navigates to Horilla, the request is silently approved, and the dashboard surfaces a confirmation that the attendance request was approved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxBn4hGO5fu_U-X4u2aEnw.png" /></figure><p><strong>Step 5: Confirm the result.</strong> The record disappears from the Not Verified tab and now appears under Verified, approved in the victim’s name, with no interaction beyond opening the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*axuFFmGqCzPPFcwfVoJn9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D0SXXxC83_cl6DC9LGqbzQ.png" /></figure><p>In a real attack, this HTML would be hosted on an attacker-controlled site or delivered through a link, so the victim never sees any file at all, only a page that appears to do nothing.</p><h3>Impact</h3><p>This is more than a cosmetic workflow bug, because attendance data does not stay in the attendance module.</p><p><strong>Payroll and overtime integrity:</strong> Attendance and time records feed payroll and overtime calculations. Fraudulent or erroneous attendance can be force-approved without the responsible manager’s intent, and this can be done at scale simply by luring managers to a link. That turns an approval control into a rubber stamp.</p><p><strong>Audit-trail corruption: </strong>Every forged approval is recorded as approved_by = &lt;victim&gt;. The person who never intended to approve anything is the one the system blames. That undermines the reliability of the audit trail exactly when you would most want to trust it, such as during a payroll dispute or an investigation.</p><p>The vulnerability requires a manager-level victim (someone with the attendance.change_attendance permission), but that is a low bar in practice. Managers are precisely the people who routinely click links about their team.</p><h3>References</h3><ul><li>GitHub Security Advisory: <a href="https://github.com/horilla/horilla-hr/security/advisories/GHSA-65vj-5p5g-pv5m">GHSA-65vj-5p5g-pv5m</a></li><li>CVE: CVE-2026-86066</li><li>CWE-352 (Cross-Site Request Forgery): <a href="https://cwe.mitre.org/data/definitions/352.html">https://cwe.mitre.org/data/definitions/352.html</a></li><li>Project: <a href="https://github.com/horilla/horilla-hr">https://github.com/horilla/horilla-hr</a></li></ul><h3>About the author</h3><p>I am a passionate security researcher with a focus on offensive security and vulnerability research. I enjoy breaking things responsibly and helping teams fix them before attackers can.</p><p>For more research and write-ups, or to get in touch:</p><ul><li>LinkedIn: <a href="https://linkedin.com/in/anjana-manoj-442595174">https://linkedin.com/in/anjana-manoj-442595174</a></li><li>Medium: <a href="https://medium.com/@anjanamanojbhadra">https://medium.com/@anjanamanojbhadra</a></li><li>GitHub: <a href="https://github.com/anjanamanojbhadra">https://github.com/anjanamanojbhadra</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd2024e25b4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking GraphQL: A Penetration Testing Guide]]></title>
            <link>https://medium.com/@anjanamanojbhadra/hacking-graphql-a-penetration-testing-guide-5ebe99572052?source=rss-049867c12f9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ebe99572052</guid>
            <dc:creator><![CDATA[Anjana Manoj]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 17:36:35 GMT</pubDate>
            <atom:updated>2026-04-19T17:36:35.170Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>GraphQL is a query language for APIs and a runtime for executing those queries. It was developed internally at Facebook in 2012 and open-sourced in 2015. GraphQL exposes a single endpoint that handles everything. The main advantage of using Graphql is the client sends a query describing exactly what data it needs. The server returns exactly that data, nothing more and nothing less. GraphQL is fundamentally different from REST APIs, and that difference is what makes it both powerful and dangerous from a security perspective. Unlike REST, where each endpoint exposes a fixed set of data, GraphQL exposes a single endpoint that accepts complex, client-defined queries.</p><h3>How GraphQL Works</h3><h4>The Single Endpoint</h4><p>All GraphQL operations are typically sent as HTTP POST to a single endpoint.</p><p>Some common graphql endpoints are</p><pre>/graphql<br>/graphiql<br>/api/graphql<br>/api/v1/graphql<br>/v1/graphql<br>/query</pre><h4>Operations</h4><p><strong>Queries</strong> — Read-only data fetching. Equivalent to GET requests.</p><p><strong>Mutations</strong> — Write operations that change server state. Equivalent to POST, PUT, PATCH, and DELETE combined.</p><p><strong>Subscriptions</strong> — Real-time event streams over WebSockets. Often overlooked during testing, but a rich attack surface in their own right.</p><h4>The Schema</h4><p>The schema is the contract between the server and its clients. Written in SDL (Schema Definition Language), it defines every type of data available, every field on every type, every operation a client can perform, and the exact shape of arguments and return values. For an attacker, <strong>the schema is everything.</strong></p><h3>What Is Introspection?</h3><p>GraphQL has a built-in feature called <strong>introspection</strong> that lets clients query the schema itself which contains every type, field, mutation, and argument. When left enabled in production, introspection gives you the entire data model of the application.</p><p>This is the single most powerful reconnaissance tool. A complete introspection query gives more information about an API. Most GraphQL frameworks enable introspection by default in all environments. It should be disabled in production.</p><p>Complete roadmap of the application’s data model before a single real attack has even begun.</p><p>Sending the standard introspection query:</p><pre> { __schema <br>{ types <br>{ name <br>fields <br>{ name<br> type <br>{ name } <br>} } } }. <br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gf714TcJRqUHv8cXHNE_Aw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_SG23aFhVGT3RI9tZgAgg.png" /></figure><p>If the server responds, the attacker receives every type, every field, every mutation, every subscription, and all their argument definitions. This is the equivalent of handing someone not just the front door key, but a complete architectural blueprint of the building including every room, every hallway, every lock. From this single query, an attacker knows what data exists, what actions can be taken, and what inputs are accepted.</p><p>A tool such as <a href="https://apis.guru/graphql-voyager/"><strong>GraphQL Voyager</strong></a> can be used to get a better understanding of the GraphQL endpoint .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gh6pF-0LQxki9RlsKfCubw.png" /></figure><h4>GraphQL Field Suggestion</h4><p>GraphQL has a built-in feature called <strong>Field Suggestion</strong> (also called <strong>Did You Mean</strong>). When you query a field that doesn’t exist, GraphQL is helpful by nature . it looks at similar field names in the schema and suggests what you might have meant.</p><p>This is great for developers. It’s a goldmine for attackers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auDymvUYjWKCUh1Q-Vp29Q.png" /></figure><p>By probing with slightly wrong field names, an attacker can enumerate valid fields even when introspection is locked down. Tools like <strong>Clairvoyance</strong> automate this process by sending thousands of variations and mapping the schema structure from error messages alone.</p><h3><strong>GraphQL Injection attacks</strong></h3><p>GraphQL Injection is a class of security vulnerability that occurs when an attacker is able to supply maliciously crafted input through GraphQL query arguments, mutation variables, or operation parameters that are passed by the server’s resolver functions directly into backend systems such as SQL databases, NoSQL databases, operating system commands, LDAP directories, or template engines without adequate sanitization, validation, or parameterization, thereby allowing the attacker to manipulate the logic of the backend query or command being constructed, break out of the intended data boundaries, and interact with the underlying system in ways that were never authorized or intended by the application developer.</p><p>Here an example of simple command injection in graphql.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJKUmlmIhsiOkhGlINZlZA.png" /></figure><h3><strong>GraphQL DoS Attacks</strong></h3><p>Denial of Service attacks against GraphQL APIs are fundamentally different from traditional DoS attacks that rely on flooding a server with thousands of HTTP requests. GraphQL DoS is far more surgical and devastating .A single, carefully crafted HTTP request containing a malicious query can consume gigabytes of memory, exhaust CPU threads, lock up database connection pools, and bring an entire application to its knees within seconds. This is possible because GraphQL gives the client enormous control over the shape and depth of the server’s execution.</p><h4><strong>Alias-Based Attack</strong></h4><p>GraphQL aliases allow a client to request the same field multiple times under different names in a single query. An attacker exploits this by aliasing an expensive field hundreds or thousands of times, forcing the server to resolve it independently for each alias.</p><p>Query</p><pre>{<br>user1: user(id: 1) { email }<br>user2: user(id: 2) { email }<br># … repeated 500 times<br>}</pre><h4><strong>Deep Recursion Query Attack</strong></h4><p>GraphQL schemas naturally contain circular type relationships like a User has friends who are also Users, who also have friends. An attacker exploits this by nesting queries through these circular relationships to an extreme depth, causing the server to execute an exponentially growing number of resolver calls with each additional level. A ten-level deep query on a schema where each list field returns 50 items can trigger billions of potential resolver executions, collapsing memory and exhausting database connections from a single request.</p><pre>{<br>user(id: &quot;1&quot;) {<br>friends {<br>friends {<br>posts {<br>author {<br>friends {<br>friends {<br>posts {<br>author {<br>friends {<br>name email createdAt<br>}<br>}<br>}<br>}<br>}<br>}<br>}<br>}<br>}<br>}<br>}</pre><h4><strong>Resource Intensive Query Attack</strong></h4><p>It is a GraphQL Denial of Service technique in which an attacker identifies the most computationally expensive resolver in the target schema such as a full-text search, data export, analytical aggregation, or machine learning inference field and repeatedly invokes it with the broadest possible parameters and largest possible input ranges, maximizing the server-side CPU consumption, memory usage, and database load triggered by each individual request, such that even a low volume of requests is sufficient to saturate server resources and render the application unresponsive to legitimate users.</p><h4><strong>Field Duplication Attack</strong></h4><p>An attacker repeats an expensive field dozens of times inline or by spreading the same fragment multiple times across a query, causing the resolver to execute once per occurrence rather than once total.</p><pre>{<br>user(id: &quot;1&quot;) {<br>expensiveComputedField<br>expensiveComputedField<br>profile {<br>fieldname<br>fieldname<br>fieldname<br>}<br>}<br>}</pre><h4><strong>Batch Query Attack</strong></h4><p>A Batch Query Attack is a GraphQL Denial of Service and authentication bypass technique in which an attacker exploits the GraphQL query batching feature which legitimately allows multiple query or mutation operations to be submitted as a JSON array inside a single HTTP request by packing thousands of operations such as login attempts, one-time password guesses, or resource-heavy queries into one array, bypassing all HTTP-level rate limiting and request throttling mechanisms that count the entire array as a single request, thereby enabling brute-force attacks against authentication endpoints and overwhelming server processing capacity at a rate that conventional defenses cannot detect or block.</p><pre>[<br>{&quot;query&quot;: &quot;mutation { login(username: \&quot;admin\&quot;, password: \&quot;password1\&quot;) }&quot;},<br>{&quot;query&quot;: &quot;mutation { login(username: \&quot;admin\&quot;, password: \&quot;password2\&quot;) }&quot;},<br>{&quot;query&quot;: &quot;mutation { login(username: \&quot;admin\&quot;, password: \&quot;password3\&quot;) }&quot;},<br><br>#10000 times<br>{&quot;query&quot;: &quot;mutation { login(username: \&quot;admin\&quot;, password: \&quot;password\&quot;) }&quot;}<br>]</pre><h4><strong>Circular Fragment Attack</strong></h4><p>A Circular Fragment Attack is a GraphQL Denial of Service technique in which an attacker crafts a query containing fragment spread definitions that form a cycle where Fragment A spreads Fragment B, which directly or through intermediate fragments spreads Fragment A again and submits it to a server whose query validation logic fails to perform complete cycle detection across all fragment relationships before execution, causing the server to enter an infinite or unbounded expansion loop while attempting to resolve the query. It consumes all available CPU and memory until the process crashes or becomes entirely unresponsive, and further exploiting the fact that even non-cyclic fragments spread at multiple points in a query expand exponentially in their logical execution cost relative to their compact textual representation.</p><h3>Authentication &amp; Authorization Flaws</h3><p>Authentication and authorization flaws are consistently the highest-impact findings in any GraphQL assessment and GraphQL makes them uniquely easy to miss.</p><h4>Broken Object Level Authorization (BOLA )</h4><p>GraphQL queries typically accept an object identifier as an argument. If the resolver fetches data using that ID without verifying the requesting user actually owns or has permission to access that object, an attacker can access any object by iterating IDs.</p><pre><br>query {<br>  user(id: &quot;4&quot;) {<br>    email<br>    phoneNumber<br>    Address { street city }<br>  }<br>}</pre><h4><strong>Broken Function Level Authorization (BFLA)</strong></h4><p>Sensitive mutations are sometimes accessible without elevated privileges because the server relies entirely on the frontend UI to hide them rather than enforcing authorization at the resolver. An attacker who reads the schema through introspection sees every mutation regardless of what the interface exposes — privilege escalation, account deletion, and admin operations that were never meant to be reachable become trivial to find and call directly. Implement role-based authorization middleware that runs before every resolver to prevent this attack.</p><h4>Mass Assignment via Mutations</h4><p>User sends extra fields in a mutation that the server shouldn’t accept like elevating their own role or modifying internal flags.</p><h3>Conclusion</h3><p>GraphQL is not a hard target. it is an overlooked one. The vulnerabilities are not buried deep in obscure configurations or complex exploit chains. They are sitting in open schemas, unprotected resolvers, and default settings that nobody changed before shipping to production. The attacker who takes thirty minutes to read the schema properly will find more than a scanner running for hours ever will.</p><p>The techniques here are not the destination. They are the vocabulary. Get the schema, understand the data model, map every operation, and test every assumption the application makes about trust. Do that methodically and GraphQL will tell you far more than its developers ever intended.</p><p>The schema is always talking. The only question is whether you are listening.</p><p><strong>References</strong></p><ul><li><a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a></li><li><a href="https://portswigger.net/web-security/graphql">PortSwigger — GraphQL API Vulnerabilities</a></li><li><a href="https://www.apollographql.com/docs/apollo-server/security/authentication/">Apollo Server Security Documentation</a></li><li><a href="https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/graphql">HackTricks — GraphQL</a></li></ul><p>Happy Hacking. Stay Ethical.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ebe99572052" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>