Skip to content
Path traversal Disclosed report Beginner

A profile page of a user can be denied from loading by appending .html to the username

A user could register a username ending in .html that matched an existing GitLab page name, so visiting that user's profile loaded the static page instead of the profile. This let a user hide their profile from public view.

maruthi12 Follow

Originally disclosed on HackerOne

Bounty$200 Low View original
  • Triaged in 18 days
  • Fixed in 2.5 years
  • Paid in 30 days
  • Disclosed after 2.6 years

Summary by the program

This class of bugs would be considered as Informative due to minimal security impact, as per latest program policy.

The report

Summary: I was able to create a user with the username "dashboard.html". Once, the account is set up, when the user clicks on his profile, the actual dashboard will show up instead of his profile page. Same can be done for all the HTML pages in GitLab.

Steps To Reproduce:

  1. Register a new user with "some_html_page_in_gitlab.html"
  2. After logging in. click on the profile tab, it will be redirected to the dashboard page.
  3. I even tried the username "profile.html", it is getting directed to the profile tab.

Impact

The major impact here I can think of is that a user can hide his profile from the public just by having a clowny username.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is GitLab, and the feature is user registration and the public profile page. The researcher found that a username such as dashboard.html collides with a real GitLab route, so the profile page of that account cannot be loaded normally.

The researcher registered an account whose username was dashboard.html. After logging in and clicking the profile tab, the browser landed on the dashboard page rather than on the user's profile. The same behaviour was observed for other HTML pages in GitLab, and the researcher also tried the username profile.html, which was directed to the profile tab.

The reproduction steps as written are:

  1. Register a new user with some_html_page_in_gitlab.html.
  2. After logging in, click on the profile tab; it will be redirected to the dashboard page.
  3. The researcher also tried the username profile.html, which was directed to the profile tab.

The report's stated impact is limited: a user can hide their profile from the public simply by choosing an unusual username. The program classified this class of bug as Informative because of minimal security impact under its then-current policy, and the report carries a low severity with a 200.00 USD bounty. The report does not describe a fix.

Root cause

The report does not explain the cause.

Impact

Within the report, the effect is that clicking the profile tab lands on a different page instead of the profile. The researcher frames this as a way to hide a profile from the public. There is no claim of data disclosure, privilege escalation or cross-user effect, and the program's own summary treats the security impact as minimal.

How this kind of bug works

Many applications build resource URLs by concatenating a user-controlled identifier into a path, for example /users/<name>. The web server or framework then decides how to handle the request, often by matching the path against a route table and by inspecting the extension. A trailing .html, .json, .php or similar suffix can change that decision: a rewrite rule may append a script extension, a static file handler may take over, or a route with a higher priority may match first.

The bug class is a routing and input-normalisation problem rather than an injection. It appears when identifiers are not constrained to a character set that cannot collide with route syntax, and when the router does not distinguish between an identifier and a path suffix. Defences are straightforward: restrict usernames to a safe alphabet, reject reserved words and suffixes, and resolve identifiers through a lookup that cannot be confused with a route.

How to test for it

  1. Identify every feature where a user-chosen string becomes part of a URL path: usernames, organisation or project slugs, page titles, file and folder names, short links.
  2. Note the reserved paths of the application: dashboards, login, settings, admin, API prefixes, static asset directories.
  3. Register or create an object whose identifier is a reserved path plus a suffix that the stack treats specially, such as .html, .json, .xml, .php or a trailing slash.
  4. Request the object's canonical URL and compare the response with the expected page: status code, title, body markers and redirects.
  5. Repeat with the identifier alone, with different cases, with URL-encoded dots and with a query string, to see whether the behaviour depends on the suffix or on the route.

A positive result is a response that is clearly a different feature (for example a dashboard or an error page from another handler) while the object exists and is otherwise reachable. Common false positives are a generic 404 for an identifier that was never created, a redirect to a login page caused by missing authentication rather than by routing, and caching artefacts where a proxy serves a stale page. Confirm by creating a second account with a harmless name and checking that its profile loads normally.

How it is fixed

The standard fixes are to validate identifiers against a strict allowlist that excludes dots and reserved words, to reserve the suffixes and route names the application uses, and to make the router match identifiers through an explicit parameter rather than by string concatenation. Where suffixes must be supported, the handler should strip and validate them before lookup, and unknown suffixes should return a not-found response instead of falling through to another route.

Hunting notes

This class tends to hide in multi-tenant platforms with user-chosen slugs, in CMS-style page and file naming, in URL shorteners, and in any application that mixes static file serving with dynamic routes. Recon signals include frameworks that expose extension-based routing, rewrite rules in server configuration, and features that let users pick a name that appears verbatim in a link.

Impact is the hard part. A profile that cannot be loaded is usually treated as informative, as this report shows. To make a report land, look for a case where the collision crosses a trust boundary: a reserved path that belongs to another user or tenant, a suffix that bypasses an authorisation check, or a route that leaks data the requester should not see. Demonstrate the difference between the expected and actual response with concrete requests and responses, and state plainly what an attacker gains beyond an odd-looking URL.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

GitLab is a website where teams keep their code and work on projects together. Every person who signs up gets an account with a username, and that username appears in the address of their profile page, the page that shows who they are. The researcher found that if you pick a username such as dashboard.html, the profile page of that account will not open. Instead, the browser shows a different page of GitLab.

To understand why, you need one idea: a web address is not just a label, it is an instruction. When you type an address into your browser, the browser sends a request to the server, which is the computer that runs the website. The server reads the address and decides which page to build and send back. If the address looks like a request for a particular page, the server serves that page.

.html is the usual ending for a file that contains a web page. Many servers treat an address ending in .html as a request for a page file rather than as a name.

The researcher registered an account with the username dashboard.html. After logging in and clicking the profile tab, the browser landed on the dashboard page instead of the profile. The same thing happened with other HTML pages in GitLab. The researcher also tried the username profile.html, and that one was sent to the profile tab.

The steps to reproduce, as written in the report, are:

  1. Register a new user with some_html_page_in_gitlab.html.
  2. After logging in, click on the profile tab; it will be redirected to the dashboard page.
  3. The researcher also tried the username profile.html, which was directed to the profile tab.

Step 1 matters because it is the whole trick: the username is chosen so that it looks like the name of a page. Step 2 matters because it shows the result in the browser, which is what a user actually sees. Step 3 matters because it shows the behaviour also occurs with another page name.

The impact stated in the report is small. A user can hide their profile from the public simply by choosing an unusual username. The program treated this class of bug as Informative because of minimal security impact under its policy at the time. The report carries a low severity and a 200.00 USD bounty. It does not describe a fix.

In general, how this kind of bug works

Many websites build the address of a page by gluing a name the user chose into a fixed address. Think of a hotel that gives every guest a room number, and the front desk finds your room by reading the number you give it. If a guest is allowed to choose the word "kitchen" as a room number, the front desk may send visitors to the kitchen instead of to a room. The name and the building's own labels collide.

On the web, the same collision happens with addresses. The server keeps a list of routes, which are the patterns of addresses it knows how to answer, such as the dashboard, the login page or the settings page. When a request arrives, the server compares the address with that list. A suffix such as .html, .json, .php or a trailing slash can change which pattern matches. A rule may add a file ending, a handler for static files may take over, or a route with higher priority may win.

This is a routing and input-normalisation problem, not an injection. Injection means sneaking commands or code into data so the server runs them. Here nothing is run: the server simply picks the wrong page. The bug appears when usernames are not limited to a safe set of characters, and when the router cannot tell an identifier apart from a path suffix.

How to test for it

  1. Find every place where a name you choose becomes part of an address: usernames, project names, page titles, file and folder names, short links.
  2. Write down the addresses the site uses for its own pages: dashboard, login, settings, admin, API prefixes, folders for static files.
  3. Create an object whose name is one of those page names plus a suffix the site treats specially, such as .html, .json, .xml, .php or a trailing slash.
  4. Open the object's normal address and compare what you get with what you expected: the status code, the page title, visible markers and any redirects.
  5. Repeat with the name alone, with different capitalisation, with encoded dots and with a query string, to see whether the suffix or the route is responsible.

A positive result is a response that is clearly a different feature, for example a dashboard or an error page from another handler, while the object exists and can be reached another way. Common false positives are a generic not-found page for a name that was never created, a redirect to the login page caused by missing authentication rather than by routing, and caching artefacts where a proxy serves an old page. Confirm by creating a second account with a harmless name and checking that its profile loads normally.

How it is fixed

The usual fixes are to validate names against a strict allowlist that excludes dots and reserved words, to reserve the suffixes and route names the application uses, and to make the router match identifiers through an explicit parameter rather than by gluing strings together. Where suffixes must be supported, the handler should strip and validate them before looking anything up, and unknown suffixes should return a not-found response instead of falling through to another route.

Hunting notes

This class tends to hide in platforms where many users pick their own names, in content systems where pages and files are named by users, in link shorteners, and in any application that mixes static file serving with dynamic routes. Useful signals are frameworks that route by file extension, rewrite rules in server configuration, and features that let users pick a name that appears word for word in a link.

Impact is the hard part. A profile that cannot be loaded is usually treated as informative, as this report shows. To make a report land, look for a case where the collision crosses a trust boundary: a reserved path that belongs to another user or organisation, a suffix that bypasses an authorisation check, or a route that leaks data the requester should not see. Show the difference between the expected and actual response with concrete requests and responses, and state plainly what an attacker gains beyond an odd-looking address.

Glossary

  • Server: the computer that runs a website and sends pages to your browser.
  • Request: the message your browser sends to a server asking for a page or other resource.
  • Response: the message the server sends back, containing the page or an error.
  • Route: a pattern of address that a server knows how to answer, such as the dashboard or the login page.
  • Router: the part of a web application that compares an incoming address with its list of routes and picks the matching one.
  • Redirect: an instruction from the server telling the browser to load a different address instead.
  • Username: the name a person chooses for their account, often shown in the address of their profile page.
  • Profile page: the public page that shows information about a user.
  • Dashboard: the main overview page a user sees after logging in.
  • .html: the usual file ending for a web page; servers often treat an address ending in it as a request for a page file.
  • Suffix: an ending added to a name or address, such as .html or .json.
  • Path segment: one part of a web address between two slashes.
  • Static file: a file such as an image or a page that the server sends as it is, without building it dynamically.
  • Input normalisation: the process of cleaning and standardising input so that different spellings of the same thing are treated the same way.
  • Allowlist: a list of values that are explicitly permitted, with everything else rejected.
  • Reserved word: a name the application keeps for itself, such as admin or login, which users are not allowed to take.
  • Injection: a bug where attacker-supplied data is treated as commands or code and executed by the server.
  • Authorisation check: the part of an application that decides whether a user is allowed to see or do something.
  • Trust boundary: a line between parties with different privileges, such as one user and another, or a user and an administrator.
  • False positive: a result that looks like a bug but is not one.
  • Status code: a number in the response that says how the request went, such as 200 for success or 404 for not found.
  • Caching: storing a copy of a response so it can be served again faster, which can sometimes show an old page.
  • Proxy: a server that sits between your browser and the website and forwards requests.
  • Severity: a rating of how serious a bug is.
  • Bounty: a payment a company makes to someone who reports a valid security bug.
  • Informative: a report classification meaning the behaviour was noted but judged to have minimal security impact.

More by maruthi12

View all

4 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.