https://github.com/grafana/grafana/commit/c798c0e958d15d9cc7...
The docs for filepath.Clean state the following:
...
3. Eliminate each inner .. path name element (the parent directory)
along with the non-.. element that precedes it.
4. Eliminate .. elements that begin a rooted path:
that is, replace "/.." by "/" at the beginning of a path,
assuming Separator is '/'.
There is no mention that this function cannot be used for security, or that it does not safely ensure a path can't refer to a parent directory.A quick reading of 3 and 4 will make you assume that a path has no ".."s after being "Clean"d. If you actually think about it more, you'll realize that of course it will leave ".." at the beginning of relative paths, but the docs do not make it clear, and I can understand why a programmer might reach for this.
There's no clearer function to reach for either, like "filepath.DirectoryContains(parent, path) bool".
The 0day is only for Grafana-the-software, not for the Grafana Agent.
Also important to note: While the overall course of events is clearly less than ideal, we still strongly believe that Jordy did us good. Mistakes happen, and the intention was good. Overall, Grafana is now more secure than it was last week.
> --path-as-is
> Tell curl to not handle sequences of /../ or /./ in the given URL path. Normally curl will squash or merge
> them according to standards but with
>this option set you tell it not to do that.
> Added in 7.42.0.
Doesn't quite sound like an "ethical hacker" to me.
On balance, I still prefer if someone approaches us with good intentions and messes up a bit over someone simply dumping a 0day into the wild or into private circles. And this way, we at least had a tested patch in hand already and knew that Grafana Cloud was not affected.
And as per https://news.ycombinator.com/item?id=29495431 ... we all make mistakes.
Is 8.3.1 patched?
[edit: Just installed 8.3. Alert conditions warn they are now "beta feature" and "could stop working in next version". Is Grafana removing features every release?]
I agree that the term is inadequate, I can just see how we got here.
Does someone know why they were playing on sitting on the public release for a week after private release?
Seems that by doing this they allowed it to become a 0day.
Seems that they can enforce an embargo with their private customers so that it won't become a 0day.
It became a 0day because the security researcher inadvertently kicked off public discussion.