Skip to content
Access control Disclosed report Beginner

Authentication Bypass on https://███████/

A session-creation endpoint issued a valid session to unauthenticated visitors, so anyone who requested it was treated as logged in. An attacker could therefore reach the protected site without credentials.

bulldawg Follow

Originally disclosed on HackerOne

  • Triaged in 11 hours
  • Fixed in 2 months
  • Disclosed after 4 months

An authentication bypass vulnerability exists on https://████████/ which allows access to the site.

When visiting /███████/GxSessionIfc.php, this creates a valid session for the user and allows them to bypass the ████████ authentication requirement.

PoC:

  1. Visit https://████/dncp/home.php, and see that you are automatically redirected to https://████████/dncp/█████.php, the authentication page.
  2. Visit https://██████████/████████/GxSessionIfc.php, which redirects to https://████████/████████/GxAccessTokenIfc.php, and subsequently https://██████████/dncp/home.php with a valid session.

I would be more than happy to continue testing this application from an authenticated perspective using this vulnerability to demonstrate further impact and severity as well as discover additional vulnerabilities that may be of value. However, I did not want to overstep and instead decided to stop testing and report the bug as-is. Please let me know if you would like me to continue testing, as I would be more than happy to provide that additional value.

Impact

An unauthorized user, such as an attacker, would be able to gain unauthorized access to this site. This is a breach of confidentiality. In addition, based on the functionality within the site, the impact to integrity of data and availability of the system may vary.

System Host(s)

████████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

  1. Visit https://██████/dncp/home.php, and see that you are automatically redirected to https://██████/dncp/███.php, the authentication page as you are unauthenticated.
  2. Visit https://████/███████/GxSessionIfc.php, which redirects to https://██████/█████/GxAccessTokenIfc.php, and subsequently https://███████/dncp/home.php with a valid session. You can now see you are authenticated, bypassing the authentication mechanism.

Suggested Mitigation/Remediation Actions

Enforce access controls on the endpoints that set valid sessions to unauthenticated users.

The original report as published on HackerOne, by bulldawg. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

The target is a web application hosted on a U.S. Department of Defence system, reachable at https://████████/. The application has a dncp area with a home.php page that redirects unauthenticated visitors to an authentication page. Unauthenticated visitors are redirected to an authentication page under the same dncp path.

The report describes an authentication bypass: a specific endpoint, GxSessionIfc.php, creates a valid session for whoever requests it, without any prior authentication. The weakness is classified as improper authentication (generic) and was rated medium severity.

Setup

The report does not describe any accounts, roles, tools or versions. The only precondition is network access to the host and the ability to request the two endpoints named below. No credentials are needed at any point, which is the whole point of the finding.

Finding it

The researcher observed that the dncp application enforces authentication by redirecting unauthenticated visitors away from home.php to a login page. The interesting part is the session interface endpoint GxSessionIfc.php: requesting it directly issues a valid session and then hands the browser on to a token interface endpoint, GxAccessTokenIfc.php, before returning it to home.php. In other words, the session-establishing endpoint is reachable without authentication, and the application treats the resulting session as legitimate.

Exploitation

Step 1: Confirm the authentication gate

Visit the protected home page:

Because the request is unauthenticated, the application automatically redirects to https://████████/dncp/█████.php, the authentication page. This establishes the baseline: without a session, home.php is not reachable.

Step 2: Request the session interface endpoint

Visit the session endpoint directly:

This endpoint redirects to https://████████/████████/GxAccessTokenIfc.php, and subsequently to https://██████████/dncp/home.php with a valid session. The researcher can then see that they are authenticated, having bypassed the authentication mechanism.

The chain is short: GxSessionIfc.php redirects to GxAccessTokenIfc.php, and subsequently to home.php with a valid session. No credentials, cookies or tokens from a legitimate user are supplied at any point.

Root cause

The session-establishing endpoint does not check whether the caller is authenticated before creating a valid session. The application redirects unauthenticated users from home.php to the login page, but GxSessionIfc.php creates a valid session without authentication. Once those endpoints have run, the resulting session satisfies the gate.

The redirect-based gate on home.php did not help, because the attacker never needed to pass through it unauthenticated: they arrived with a session already issued by the application itself.

Impact

An unauthorised user, such as an attacker, can gain unauthorised access to the site. The researcher describes this as a breach of confidentiality. Based on the functionality within the site, the impact to integrity of data and availability of the system may vary. The report does not enumerate the specific data or actions available once authenticated.

The researcher offered to continue testing from an authenticated perspective to demonstrate further impact and severity and to look for additional vulnerabilities, but stopped and reported the bug as-is rather than overstep.

Fix

The suggested remediation is to enforce access controls on the endpoints that set valid sessions to unauthenticated users. In practice that means enforcing access controls on the endpoints that set valid sessions to unauthenticated users.

The report does not state whether a fix was applied.

Variants to test

  1. Request other session or token interface endpoints directly, without cookies, and see whether the response sets a session cookie or redirects into an authenticated page. A positive result is landing on a protected page without having logged in.
  2. Follow the redirect chain manually and inspect each hop for Set-Cookie headers or tokens issued before any credential check. A positive result is a session artefact appearing on a hop that had no authentication.
  3. Try the same pattern on sibling applications that share the Gx naming convention for session and access token interfaces. A positive result is the same unauthenticated session issuance.
  4. Replay the session endpoint after logging out, or from a fresh browser profile, to confirm the session is genuinely new and not a cached one. A positive result is a working session in a clean context.

Hunting notes

This kind of bug tends to hide in the plumbing around authentication: session initialisation endpoints, token hand-off endpoints and redirect helpers that sit between the login form and the protected application. They are easy to overlook because they are not linked from the UI and are only reached during a normal login, so they rarely get the same scrutiny as the login form itself.

During recon, look for endpoint names that suggest session or token handling, such as *SessionIfc.php or *AccessTokenIfc.php, and request them directly with no cookies. A redirect into a protected page, or a Set-Cookie on an unauthenticated request, is the signal. Comparing the redirect chain of a normal login with a direct request to the session endpoint makes the difference obvious.

The researcher showed impact by demonstrating the gate redirecting an unauthenticated visitor, then reaching home.php with a valid session after visiting the session endpoint. That contrast, gate versus bypass, is what makes the finding easy for a triager to reproduce and accept.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A website run by the U.S. Department of Defence had a page that sent visitors without a session to a login page. Normally, if you tried to open that page without logging in, the site would send you away to a login page. That is the site's way of saying "you are not allowed in yet".

The researcher found that one particular address on the same site, a file called GxSessionIfc.php, hands out a working login session to anyone who asks for it, with no username, password or other proof of identity. Once that address has been visited, the browser is sent onward through a second address, GxAccessTokenIfc.php, and then back to the protected home page, this time already logged in.

So the protection was real but incomplete: the front door was locked, yet a side door was open and led straight into the same room. The weakness is classified as improper authentication (generic) and was rated medium severity. The report does not name any accounts, tools or software versions, and no credentials were used at any point.

The pieces involved

Before walking through the steps, here are the parts of the site the report mentions, explained from scratch.

  • A web application: a program that runs on a server and is used through your browser. Every time you click a link or type an address, your browser sends a request to that server and the server sends back a response, usually a web page.
  • A URL (web address): the text you type in the address bar, such as https://example.com/dncp/home.php. The part after the domain name, here /dncp/home.php, is called the path and points to a specific page or file on the server.
  • dncp: the name of a section of the application. Think of it as a folder on the site that groups related pages together. The report does not say what the letters stand for.
  • home.php: the main page of that dncp section. The report says it is meant to be reachable only by authenticated users, that is, people who have proved who they are.
  • Authentication: the process of proving who you are, usually with a username and password. A site "authenticates" you when it checks those details and accepts them.
  • A session: a short-lived record that the server keeps after you log in, so it can recognise you on your next request. Because the web itself does not remember you between clicks, the server gives your browser a small piece of data (often called a cookie) to carry back on every request. If the cookie matches a session the server knows about, the server treats you as logged in. A useful comparison is a wristband at an event: you show your ticket once at the entrance, get the wristband, and after that the staff only look at the wristband, not your ticket.
  • A token: a similar idea, a piece of data that stands in for proof of identity or permission. The report mentions an "access token" interface, which suggests the site issues such a piece of data as part of the login flow.
  • A redirect: an instruction from the server telling the browser "the page you wanted is not here, go to this other address instead". You see it as the address bar changing by itself shortly after you open a link. Redirects are normal and useful, but they can also hide what is really happening, because several addresses can be visited in a fraction of a second while you only see the first and the last.
  • An endpoint: a specific address on a server that does one job when it is requested. Some endpoints return a page you look at; others do something in the background, such as starting a session. Endpoints are often not linked from any menu, which is why they are easy to miss.
  • An authentication bypass: a way to get past a login check without actually logging in properly. The site believes you are a legitimate user, but you never supplied legitimate credentials.
  • Confidentiality, integrity and availability: the three classic things security protects. Confidentiality means only the right people can see the data. Integrity means the data cannot be changed by the wrong people. Availability means the system keeps working for the people who need it.

Setup

The report describes no accounts, roles, tools or versions. The only thing needed is a computer with a browser and a network connection to the host, plus the ability to open the two addresses named below. No credentials are needed at any point, which is exactly what makes the finding serious: the whole point is that the site lets you in without them.

Finding it

The researcher noticed that the dncp application protects itself by redirecting visitors who are not logged in away from home.php and towards a login page. That is a common and reasonable design: instead of showing an error, the site simply sends you to the place where you can log in.

The interesting part is the session interface endpoint, GxSessionIfc.php. When requested directly, it creates a valid session and then passes the browser on to a token interface endpoint, GxAccessTokenIfc.php, before finally returning it to home.php. In plain terms: the address whose job is to set up a session is reachable by anyone, and the application then treats the session it created as legitimate. The name Ifc in both file names suggests "interface", a programming term for a defined way for one part of a system to talk to another.

Exploitation

Step 1: Confirm the authentication gate

The first step is to check the normal behaviour, so that the bypass can be compared against it. The researcher opened the protected home page:

This is an HTTP request, the standard message a browser sends to a web server. Reading it line by line:

  • GET is the method, the verb that says what kind of action is wanted. GET means "give me this resource", the same thing your browser does when you type an address or click a link.
  • https://████/dncp/home.php is the address being requested. https means the connection is encrypted, so nobody in between can read it. The rest is the path to the page inside the dncp section.
  • HTTP/1.1 is the version of the request format being used. It is a detail of how the message is written, not something you normally think about.

Because the request carries no session, the application automatically redirects the browser to https://████████/dncp/█████.php, the authentication page. This establishes the baseline: without a session, home.php is not reachable. Doing this first matters because it proves the protection exists and works in the ordinary case. Without that comparison, a later success could be mistaken for a page that was simply public all along.

Step 2: Request the session interface endpoint

Next, the researcher opened the session endpoint directly, without logging in first:

Again, line by line:

  • GET asks the server to fetch the resource, exactly as a browser does when you paste an address into the address bar and press Enter.
  • The address points at GxSessionIfc.php, the file whose name suggests it deals with sessions. Note that this is a different path from home.php: it is not the protected page, it is a helper that sits beside it.
  • HTTP/1.1 is the same protocol version as before.

This endpoint redirects to https://████████/████████/GxAccessTokenIfc.php, and subsequently to https://██████████/dncp/home.php with a valid session. The researcher could then see that they were authenticated, having bypassed the authentication mechanism.

The chain is short and worth spelling out:

  1. GxSessionIfc.php sets up the session, that is, it creates the server-side record and gives the browser the matching piece of data to carry.
  2. GxAccessTokenIfc.php is the next address in the redirect chain.
  3. The browser lands on home.php already logged in, because by now it holds a session the application considers valid.

No credentials, cookies or tokens from a legitimate user are supplied at any point. That last sentence is the heart of the bug: every piece of proof the site relied on was produced by the site itself, on request, for an anonymous visitor.

Root cause

The session-establishing endpoint does not check whether the caller is authenticated before creating a valid session. The application redirects unauthenticated users from home.php to the login page, but GxSessionIfc.php creates a valid session without authentication. Once those endpoints have run, the resulting session satisfies the gate.

A useful comparison is a building where the front desk asks for your badge, but the machine that prints badges is in the lobby, unguarded, and works for anyone who presses the button. The front desk check is real, but it can be satisfied with a badge the building itself just handed out.

Authorisation is the second half of the access question: authentication asks "who are you?", authorisation asks "are you allowed to do this?". The redirect-based gate on home.php did not help, because the attacker never needed to pass through it unauthenticated: they arrived with a session already issued by the application itself.

Impact

An unauthorised user, such as an attacker, can gain unauthorised access to the site. The researcher describes this as a breach of confidentiality: information meant for logged-in users may be visible to someone who should not see it. Based on the functionality within the site, the impact to integrity of data and availability of the system may vary, meaning that depending on what the site lets a logged-in user do, an intruder might also be able to change things or disrupt the service. The report does not list the specific data or actions available once authenticated.

The researcher offered to continue testing from an authenticated perspective to demonstrate further impact and severity and to look for additional vulnerabilities, but stopped and reported the bug as it stood rather than overstep. That is a sensible habit: once you have shown you can get in, further poking around inside someone else's system needs permission.

Fix

The suggested remediation is to enforce access controls on the endpoints that set valid sessions to unauthenticated users. In practice that means enforcing access controls on the endpoints that set valid sessions to unauthenticated users. In the badge comparison: the badge printer should only work for someone who has already been checked at the front desk.

Variants to test

These are follow-up ideas in the same spirit, useful if you ever meet a similar setup. Each one describes what to try and what a positive result looks like.

  1. Request other session or token interface endpoints directly, without cookies, and see whether the response sets a session cookie or redirects into an authenticated page. A positive result is landing on a protected page without having logged in.
  2. Follow the redirect chain manually and inspect each hop for Set-Cookie headers or tokens issued before any credential check. A Set-Cookie header is the server's instruction to the browser to store a small piece of data, typically the session identifier. A positive result is a session artefact appearing on a hop that had no authentication.
  3. Try the same pattern on sibling applications that share the Gx naming convention for session and access token interfaces. A positive result is the same unauthenticated session issuance.
  4. Replay the session endpoint after logging out, or from a fresh browser profile, to confirm the session is genuinely new and not a cached one. A positive result is a working session in a clean context.

Hunting notes

This kind of bug tends to hide in the plumbing around authentication: session initialisation endpoints, token hand-off endpoints and redirect helpers that sit between the login form and the protected application. They are easy to overlook because they are not linked from the user interface and are only reached during a normal login, so they rarely get the same scrutiny as the login form itself.

During reconnaissance, the early phase of exploring a target to see what exists, look for endpoint names that suggest session or token handling, such as *SessionIfc.php or *AccessTokenIfc.php, and request them directly with no cookies. A redirect into a protected page, or a Set-Cookie on an unauthenticated request, is the signal. Comparing the redirect chain of a normal login with a direct request to the session endpoint makes the difference obvious.

The researcher showed impact by demonstrating the gate redirecting an unauthenticated visitor, then reaching home.php with a valid session after visiting the session endpoint. That contrast, gate versus bypass, is what makes the finding easy for a triager to reproduce and accept. A triager is the person on the receiving end of a bug report who checks it and decides what happens next.

Glossary

  • Authentication bypass: getting past a login check without logging in properly, so the site treats you as a legitimate user without legitimate credentials.
  • Authorisation: the check of whether an identified user is allowed to do a particular thing.
  • Availability: the property that a system keeps working for the people who need it.
  • Confidentiality: the property that only the right people can see certain data.
  • Cookie: a small piece of data a server asks the browser to store and send back on later requests, often used to recognise a logged-in session.
  • Endpoint: a specific address on a server that performs one job when requested, such as starting a session or returning a page.
  • GET: the HTTP method meaning "give me this resource", used when a browser opens a page or link.
  • HTTP: the standard format for requests and responses between a browser and a web server.
  • HTTPS: HTTP carried over an encrypted connection, so the traffic cannot be read in transit.
  • Integrity: the property that data cannot be changed by the wrong people.
  • Path: the part of a URL after the domain name that points to a specific page or file, such as /dncp/home.php.
  • Reconnaissance: the early exploration of a target to discover what exists before testing it.
  • Redirect: a server instruction telling the browser to go to a different address instead.
  • Remediation: the fix that removes a vulnerability.
  • Session: a short-lived record kept by a server after login so it can recognise the same browser on later requests.
  • Set-Cookie: an HTTP response header that tells the browser to store a cookie.
  • Token: a piece of data that stands in for proof of identity or permission.
  • Triager: the person who reviews a bug report and decides how it is handled.
  • URL: a web address, the text used to locate a page or resource.
  • Web application: a program running on a server that people use through a browser.

More by bulldawg

View all

3 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.