Comodo: From .Git to Takeover
An exposed .git folder on the Comodo Forum web server allowed the full source code to be downloaded, and an unauthorised shell left in the exposed files let the researcher create files and reach the forum's database. An attacker could have downloaded, removed or edited files, potentially taking over the forum system.
Published on maordayanofficial.medium.com
Comodo Security Solutions, Inc., headquartered in Clifton, New Jersey, USA, is a leading cybersecurity company. known for its certificate authority operations, Comodo issues SSL certificates and delivers comprehensive information security products tailored for enterprises and consumers alike. The company has also made…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Comodo Security Solutions, Inc. is a cybersecurity company headquartered in Clifton, New Jersey, USA. It is known for its certificate authority operations, issuing SSL certificates, and for information security products aimed at enterprises and consumers. The company has also contributed to standard-setting work, including the IETF DNS Certification Authority Authorization (CAA) resource record.
The target of this case study is the Comodo Forum, a platform used for support, updates and interaction between regular users, clients, Comodo support staff and volunteers. The exposed asset was the forum domain, and the weakness was a .git folder left reachable on the web server.
Setup
The report does not describe any accounts, roles, tooling versions or special preconditions. The only precondition that matters is the one the report states: a .git directory deployed alongside the web application and reachable over HTTP. The work was done against the live forum domain, and the vulnerability is described as now remediated.
Finding it
The issue is a Git source code exposure. The report defines it as a situation where an application fails to protect sensitive data embedded in its source code, such as intellectual property, database passwords and secret keys. It typically comes from web server misconfiguration or typographical errors in scripts, for example granting executable permissions to certain directories or scripts. A common route is an exposed .git folder on the web server.
When a .git folder is deployed together with a web application, an attacker can use the misconfiguration to download the entire source code, including sensitive data. That can lead to intellectual property theft and unauthorised access to critical information.
The researcher identified the following URL on the Comodo Forum domain:
https://forums.comodo.com/.git/config
Because the forum handles support and interaction between users, clients, staff and volunteers, exposure of sensitive data even on a subdomain could have critical implications. An attacker exploiting the .git folder could potentially have downloaded the complete source code of Comodo's Forum, and do a lot more, posing a substantial security threat.

The screenshot shows the Comodo Forum source code obtained through the exposure. The caption notes that it was not saved and was removed after the report for the Comodo security team.
Exploitation
Step 1: Reach the exposed Git configuration
Step 2: Find the leftover shell
During the analysis, the researcher discovered that an unauthorised shell had been inadvertently left within the exposed files. This oversight allowed for a rapid escalation of the attack. The report does not say which file contained the shell or how it was originally placed there.
Step 3: Use the shell for file creation and system access
Leveraging the shell, the researcher was able to create new files and gain comprehensive access to the forum's system. This access extended beyond the initial data obtained via the .git folder vulnerability, providing up-to-date information, including current database details.

Step 4: Connect to the database
The researcher connected to the database as a proof of concept. Most of the data in the screenshots is hidden for security reasons.


The second screenshot carries the clarification that nothing was saved and that all information was sent to the Comodo security team.
With all these options in the hands of a black hat hacker, the report describes the outcome as a full takeover of the forum system.
Root cause
The mistake is deployment and server configuration: a .git directory was left reachable under the web root, so the repository metadata and objects could be fetched over HTTP. The report frames this as a typical consequence of web server misconfiguration or of scripts being given permissions they should not have. The .git folder is hidden on disk only because of the leading dot, and that does not stop a web server from serving it if nothing blocks the path.
The escalation beyond source disclosure came from a shell that had been left inside the exposed files. The report states plainly that it does not know for sure how the not-that-good shell was uploaded to the server in the first place, and that this leaves a significant risk until Comodo's security team takes care of it.
Impact
According to the report, an attacker could:
- Download everything, including the database.
- Remove files, including the database.
- Add and edit files, for example inserting a malicious file or code into an existing page such as the index page, to infect Comodo's clients, users and employees.
- And a lot more.
The report hedges the source code point: an attacker exploiting the .git folder could potentially have downloaded the complete source code of the forum.
Fix
The report gives a simple recommendation: before and after deploying code, always check for hidden files and folders. On servers this matters because the dot before .git makes the folder hidden, and many people do not check until it is too late. In this case the vulnerabilities were fixed a couple of hours after the reports, and some after a couple of days and a lot of urgent emails. The report also notes that the Comodo security team did not reply to any of the reports right away, and that responses could take a couple of months or not come at all. All of the shells were reported to Comodo.

Variants to test
- Request
/.git/configon other hosts in scope. - A positive result is any file that returns content instead of an error page.
- A positive result is a secret that is still valid or a script that is still reachable and executable.
- A positive result is a created file that can then be requested over HTTP.
What happened, in plain words
Comodo is a security company. It is best known for being a certificate authority, which means it issues the SSL certificates that make the padlock appear in your browser, and it also sells security products to businesses and home users. It has even helped write internet standards, including the IETF DNS Certification Authority Authorization (CAA) resource record, a rule that lets a domain owner say which certificate authorities are allowed to issue certificates for that domain.
The target here was the Comodo Forum, a website where regular users, paying clients, Comodo support staff and volunteers talk to each other, ask for help and read updates. A forum like this is a normal web application: it runs on a web server, it stores its posts and users in a database, and it is built from source code, which is the set of files that make the site work.
The problem was that a folder called .git was left reachable on the forum's web server. .git is the folder that the version control tool Git uses to keep the history of a project. If you can download it, you can often rebuild the whole source code of the site, and sometimes find passwords and secret keys that were saved inside it. In this case the researcher also found a shell, a small program that lets someone run commands on the server, that had been left inside the exposed files. Using it, the researcher could create files, reach the forum's database and, in the report's words, achieve a full takeover of the forum system.
Everything below explains, from zero, what each of those pieces means and why each step was taken.
Context
Comodo Security Solutions, Inc. is headquartered in Clifton, New Jersey, USA. It is a cybersecurity company known for its certificate authority operations, issuing SSL certificates, and for information security products aimed at enterprises and consumers. It has also contributed to standard-setting work, including the IETF DNS Certification Authority Authorization (CAA) resource record.
The target of this case study is the Comodo Forum, a platform used for support, updates and interaction between regular users, clients, Comodo support staff and volunteers. The exposed asset was the forum domain, and the weakness was a .git folder left reachable on the web server.
A few words to unpack before going further:
- A web server is the program that answers your browser when you type an address. It takes the path you asked for, such as
/index.html, and returns a file or a page. - A domain is the name you type, like
forums.comodo.com. A subdomain is a name that sits under a larger one, soforums.comodo.comis a subdomain ofcomodo.com. - Source code is the collection of files a developer writes to build the site. It is not normally meant to be public, because it can contain the logic of the application and secrets used to connect to other systems.
- Git is a tool developers use to track changes to source code. It stores every version of every file in a hidden folder named
.gitthat sits next to the project files.
Setup
The report does not describe any accounts, roles, tooling versions or special preconditions. The only precondition that matters is the one the report states: a .git directory deployed alongside the web application and reachable over HTTP. The work was done against the live forum domain, and the vulnerability is described as now remediated.
Finding it
The issue is a Git source code exposure. The report defines it as a situation where an application fails to protect sensitive data embedded in its source code, such as intellectual property, database passwords and secret keys. It typically comes from web server misconfiguration or typographical errors in scripts, for example granting executable permissions to certain directories or scripts. A common route is an exposed .git folder on the web server.
Two ideas are worth slowing down for:
- Misconfiguration means the software is working as designed, but it was set up in a way that leaves something open. A useful comparison is a house where the front door is locked but the key is left under the mat: nothing is broken, the key is just in the wrong place.
- Executable permissions are the settings that decide whether a file can be run as a program rather than only read. If a folder or script is given permission to run when it should not be, an attacker who can reach it may be able to make the server do things on their behalf.
When a .git folder is deployed together with a web application, an attacker can use the misconfiguration to download the entire source code, including sensitive data. That can lead to intellectual property theft and unauthorised access to critical information.
The researcher identified the following URL on the Comodo Forum domain:
https://forums.comodo.com/.git/config
Line by line, this is what that request means:
https://is the secure version of the protocol your browser uses to talk to a website. Thesstands for secure, and it means the traffic is encrypted in transit.forums.comodo.comis the address of the forum server./.git/configis the path being requested..gitis the hidden folder Git uses, andconfigis a small text file inside it that holds the repository's settings, such as where the project came from and how it is configured.
Because the forum handles support and interaction between users, clients, staff and volunteers, exposure of sensitive data even on a subdomain could have critical implications. An attacker exploiting the .git folder could potentially have downloaded the complete source code of Comodo's Forum, and do a lot more, posing a substantial security threat.

The screenshot shows the Comodo Forum source code obtained through the exposure. The caption notes that it was not saved and was removed after the report for the Comodo security team.
Exploitation
Step 1: Reach the exposed Git configuration
From there the repository contents could be reconstructed, which is what gives access to the source code and to any secrets committed with it.
Why this matters: a web server can be told to refuse certain paths. If it returns a 403 (forbidden) or 404 (not found) for /.git/config, the folder is protected. If it returns the file's contents, nothing is protecting it. Once the configuration is readable, the rest of the repository is usually reachable too, because Git stores its data in predictable files under the same folder. Rebuilding the project from those files gives you the source code, and developers sometimes leave passwords or keys inside the code by mistake.
Step 2: Find the leftover shell
During the analysis, the researcher discovered that an unauthorised shell had been inadvertently left within the exposed files. This oversight allowed for a rapid escalation of the attack. The report does not say which file contained the shell or how it was originally placed there.
A shell here means a small script that lets someone run commands on the server, as if they were sitting at its keyboard. Finding one inside the exposed files is like finding a spare set of keys in the box of documents you were already allowed to read: it turns a read-only problem into the ability to act on the system. The report is explicit that it does not know for sure how the shell got there in the first place, and that this is a risk in itself.
Step 3: Use the shell for file creation and system access
Leveraging the shell, the researcher was able to create new files and gain comprehensive access to the forum's system. This access extended beyond the initial data obtained via the .git folder vulnerability, providing up-to-date information, including current database details.
Why this is a step up: reading source code tells you how the site was built at some point in the past. Running commands on the server tells you what is true right now, including the current details needed to reach the database. A database is the organised store where the forum keeps its posts, users and settings. Being able to reach it means being able to read or change the site's actual content, not just its code.

Step 4: Connect to the database
The researcher connected to the database as a proof of concept. Most of the data in the screenshots is hidden for security reasons.
A proof of concept (often shortened to PoC) is a demonstration that a problem is real, done just far enough to show it works without causing harm. Hiding most of the data in the screenshots follows the same idea: show that the connection succeeded, without publishing the private details.


The second screenshot carries the clarification that nothing was saved and that all information was sent to the Comodo security team.
With all these options in the hands of a black hat hacker, the report describes the outcome as a full takeover of the forum system. A black hat hacker is someone who would use these abilities to cause harm or for personal gain, as opposed to a security researcher who reports the problem so it can be fixed.
Root cause
The mistake is deployment and server configuration: a .git directory was left reachable under the web root, so the repository metadata and objects could be fetched over HTTP. The report frames this as a typical consequence of web server misconfiguration or of scripts being given permissions they should not have. The .git folder is hidden on disk only because of the leading dot, and that does not stop a web server from serving it if nothing blocks the path.
That last point is worth spelling out, because it is the heart of the issue. On Linux and similar systems, a file or folder whose name starts with a dot is treated as hidden by default. Tools like the file manager or a plain directory listing will not show it. But hidden is not the same as protected: if the web server is asked for that exact path, it will happily return the file unless a rule tells it not to. The dot is a convention for tidiness, not a security control.
The escalation beyond source disclosure came from a shell that had been left inside the exposed files. The report states plainly that it does not know for sure how the not-that-good shell was uploaded to the server in the first place, and that this leaves a significant risk until Comodo's security team takes care of it.
Impact
According to the report, an attacker could:
- Download everything, including the database.
- Remove files, including the database.
- Add and edit files, for example inserting a malicious file or code into an existing page such as the index page, to infect Comodo's clients, users and employees.
- And a lot more.
The third point deserves a plain explanation. The index page is the first page a visitor sees when they open the site. If someone can edit it, they can put code there that runs in every visitor's browser. That is how a compromised forum could be used to attack the very people who came to it for support, including Comodo's own staff.
The report hedges the source code point: an attacker exploiting the .git folder could potentially have downloaded the complete source code of the forum.
Fix
The report gives a simple recommendation: before and after deploying code, always check for hidden files and folders. On servers this matters because the dot before .git makes the folder hidden, and many people do not check until it is too late. In this case the vulnerabilities were fixed a couple of hours after the reports, and some after a couple of days and a lot of urgent emails. The report also notes that the Comodo security team did not reply to any of the reports right away, and that responses could take a couple of months or not come at all. All of the shells were reported to Comodo.

Variants to test
Each one is a way of asking the same question in a different place: is anything here being handed out that should not be?
- In plain words: a
200means the server returned the file, a403means it refused, and a404means it says the file is not there. Only the first one is a problem. HEADis a small file that points at the current version of the project, andobjectsis where Git stores the actual content of every file it has ever tracked. If those are reachable too, the exposure is much larger than one settings file.- A positive result is any file that returns content instead of an error page. The reasoning is the same as with
.git: anything a developer left on the server by accident can be fetched if nothing blocks the path. - A positive result is a secret that is still valid or a script that is still reachable and executable. Credentials are the usernames, passwords or keys used to log in to something. A secret in old code is only dangerous if it still works, which is why the check is whether it is still valid.
- A positive result is a created file that can then be requested over HTTP. Reading is bad; writing is worse, because it means the attacker can leave something behind on the server and then load it in a browser.
Glossary
- API: a defined way for one piece of software to talk to another, like a menu of requests a program will accept.
- Black hat hacker: someone who uses security weaknesses to cause harm or for personal gain.
- Certificate authority: an organisation trusted to issue the digital certificates that prove a website is who it claims to be.
- Cookie: a small piece of data a website asks your browser to store and send back on later requests, often used to remember that you are logged in.
- Credentials: the usernames, passwords or keys used to prove identity and log in to a system.
- Database: an organised store of data, here the forum's posts, users and settings.
- Domain: the name of a website, such as
comodo.com. - Executable permissions: settings that decide whether a file can be run as a program rather than only read.
- Git: a tool developers use to track changes to source code over time.
.gitfolder: the hidden folder where Git keeps a project's history and settings.- Git source code exposure: a weakness where the
.gitfolder is reachable over the web, letting anyone rebuild the project's source code. - HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTPS: the encrypted version of HTTP, shown by the padlock in the browser.
- Index page: the first page a visitor sees when opening a site.
- IETF: the Internet Engineering Task Force, the body that publishes many internet standards.
- CAA record: a DNS record that says which certificate authorities may issue certificates for a domain.
- Misconfiguration: a system set up in a way that leaves something open, even though the software itself works as designed.
- Proof of concept (PoC): a small demonstration that a weakness is real, done just far enough to show it works.
- Shell: a small program or script that lets someone run commands on a server.
- Source code: the files developers write to build an application.
- SSL certificate: a digital document that proves a website's identity and enables encrypted connections.
- Subdomain: a name that sits under a larger domain, such as
forums.comodo.comundercomodo.com. - Token: a piece of data used in place of a password to prove a request is authorised, often short-lived.
- Web root: the folder on a server from which the website's files are served.
- Web server: the program that answers browser requests and returns pages or files.
- 200 / 403 / 404: HTTP status codes meaning, respectively, the request succeeded, the server refused it, and the server says the resource does not exist.