Live data from Hacker News

Anyone can access deleted and private repository data on GitHub

trufflesecurity.com

11–20 of 394 posts

Re: Anyone can access deleted and private repository data on GitHub

#11
The biggest gotcha here is probably that if you start of with a private repo and a private fork, making the repo public also makes the fork "public".

GitHub may very well say that this is working as intended, but if it truly is then you should be forced to make both the repo and fork public at the same time.

Essentially "Making repo R public will make the following forks public as well 'My Fork', 'Super secret fork', 'Fork that I deleted because it contained the password to my neighbours wifi :P'.

OK. I'm not sure if the last one would actually be public, but I wouldn't be surprised if that was "Working as intended(TM)" - GitHub SecOps

Re: Anyone can access deleted and private repository data on GitHub

#13
This isn't a bug IMO.

If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data.

If you already have the data, there is no vulnerability - since you cannot learn anything you don't already have.

If you got the hash from someone, you could likewise have gotten the data from them.

People do need to be aware that 'some random hex string' in fact is the irrevocable key to all the data behind that hash - but that's kinda inherent to gits design. Just like I don't tell everyone here on HN my login password - the password itself isn't sensitive, but both of us know it accesses other things that are.

If github itself was leaking the hash of deleted data, or my plaintext password, then that would be a vulnerability.

Re: Anyone can access deleted and private repository data on GitHub

#14
post #12

Come on, this is not surprising. "Private repositories" were never private as I said before. [0] [0] https://news.ycombinator.com/item?id=23057769

>Come on, this is not surprising.

Very cool that it is not surprising to you.

But to others (some are even in this thread!) it is both new and surprising. They unfortunately missed your 4 year old comment, but at least they get to learn it now.

Re: Anyone can access deleted and private repository data on GitHub

#18

This isn't a bug IMO. If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data. If you already have the data, there is no vulnerability - since you cannot learn anything you don't already have. If you got the hash from someone, you could likewise have gotten the data from them. People do need to be aware that 'some random hex string' in f…

That's counterintuitive, though - often, the whole point of a hash is that it's one-way.

Re: Anyone can access deleted and private repository data on GitHub

#19

This isn't a bug IMO. If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data. If you already have the data, there is no vulnerability - since you cannot learn anything you don't already have. If you got the hash from someone, you could likewise have gotten the data from them. People do need to be aware that 'some random hex string' in f…

> If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data.

Don’t think so - the article mentions you can use the short prefix on GitHub, so you have a search space of 65536.

Re: Anyone can access deleted and private repository data on GitHub

#20

This isn't a bug IMO. If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data. If you already have the data, there is no vulnerability - since you cannot learn anything you don't already have. If you got the hash from someone, you could likewise have gotten the data from them. People do need to be aware that 'some random hex string' in f…

>If you know the hash of some data, then you either already have the data yourself, or you learned the hash from someone who had the data.

From the article, you do not need to have the data nor learn the hash from someone who had the data.

>Commit hashes can be brute forced through GitHub’s UI, particularly because the git protocol permits the use of short SHA-1 values when referencing a commit. A short SHA-1 value is the minimum number of characters required to avoid a collision with another commit hash, with an absolute minimum of 4. The keyspace of all 4 character SHA-1 values is 65,536

Post reply on HN