TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hunting for Nginx alias traversals in the wild

534 pointsby celesianalmost 2 years ago

20 comments

evgpbfhnralmost 2 years ago
FWIW gixy (nginx configuration checker) catches this: <a href="https:&#x2F;&#x2F;github.com&#x2F;yandex&#x2F;gixy&#x2F;blob&#x2F;master&#x2F;docs&#x2F;en&#x2F;plugins&#x2F;aliastraversal.md">https:&#x2F;&#x2F;github.com&#x2F;yandex&#x2F;gixy&#x2F;blob&#x2F;master&#x2F;docs&#x2F;en&#x2F;plugins&#x2F;a...</a><p>(and nixos automatically runs gixy on a configuration generated through it, so the system refuses to build &lt;3)
评论 #36585496 未加载
评论 #36583865 未加载
评论 #36581196 未加载
评论 #36583242 未加载
542458almost 2 years ago
At risk of asking a dumb question, is there any good reason that you’d <i>want</i> nginx to allow traversing into “..” from a URL path? It just seems like problems waiting to happen.<p>Edit: Actually, I’m a bit lost as to what’s happening in the original vuln. <a href="http:&#x2F;&#x2F;localhost&#x2F;foo..&#x2F;secretfile.txt" rel="nofollow noreferrer">http:&#x2F;&#x2F;localhost&#x2F;foo..&#x2F;secretfile.txt</a> gets interpreted as &#x2F;var&#x2F;www&#x2F;foo&#x2F;..&#x2F;secretfile.txt or whatever… but why wouldn’t a server without the vulnerability interpret <a href="http:&#x2F;&#x2F;localhost&#x2F;foo&#x2F;..&#x2F;secretfile.txt" rel="nofollow noreferrer">http:&#x2F;&#x2F;localhost&#x2F;foo&#x2F;..&#x2F;secretfile.txt</a> the same way? Why does “..” in paths only work <i>sometimes</i>?
评论 #36580826 未加载
评论 #36584002 未加载
评论 #36580746 未加载
评论 #36580765 未加载
评论 #36582002 未加载
amlutoalmost 2 years ago
How is this not seen as a vulnerability in nginx? This behavior is utterly absurd, seems to have no beneficial purpose, and straightforwardly exploitable.
评论 #36581362 未加载
评论 #36581153 未加载
technionalmost 2 years ago
OK hear me out: a Linux capability like option that removes the .. option from the kernels file name parser.<p>Like web apps have been seen various bypasses involving somehow smuggling two dots somewhere since we were on dial up modems. It&#x27;s time to look for a way to close this once and for all, as the Linux kernel has done with several other classes of user land bugs.
评论 #36581565 未加载
评论 #36582239 未加载
评论 #36584374 未加载
评论 #36583714 未加载
评论 #36583194 未加载
评论 #36587277 未加载
HenriTELalmost 2 years ago
&gt; The Google VRP Team recognized our work by awarding us a $500 reward for uncovering this vulnerability. They believed the impact on the application wasn&#x27;t severe enough to warrant a larger reward.<p>Exposing email and private keys of GCP accounts only gives you $500 reward? WTF. Google being Google I guess.
Decabytesalmost 2 years ago
Glad that the leaks are still encrypted. Even companies that specialize in this sort of stuff are not immune to leaks, so this is honestly the best case scenario.
gostsamoalmost 2 years ago
The title is significantly editorialized. The post title is:<p>Hunting for Nginx Alias Traversals in the wild<p>and the hn submission highlights the bitwarden vulnerability while there is a google one discussed as well.
评论 #36587809 未加载
kibwenalmost 2 years ago
If all you need is a simple way to serve static files that minimizes resource consumption and is reliably secure, what is the state of the art these days? In the past I would probably reach for Nginx, but I wonder if a more focused&#x2F;less configurable tool would be preferable from a security standpoint.
评论 #36582210 未加载
评论 #36580764 未加载
评论 #36582010 未加载
评论 #36580762 未加载
评论 #36581133 未加载
评论 #36582004 未加载
评论 #36581786 未加载
评论 #36584679 未加载
whiskeymikeyalmost 2 years ago
This is probably a dumb question but why would Bitwarden allow unauthenticated requests to &#x2F;attachments at all? Even with the Nginx bug, wouldn’t the request have failed if that URL required authentication?
评论 #36581417 未加载
jandalmost 2 years ago
Please excuse the silly question: Would proper directory and file ownerships not prevent this traversal?<p>If nginx does not run as root, how can it read other files than the ones explicitly assigned to the nginx user?
评论 #36584448 未加载
评论 #36583241 未加载
评论 #36582484 未加载
评论 #36582590 未加载
评论 #36582512 未加载
Xophmeisteralmost 2 years ago
OT but this isn&#x27;t the first time I&#x27;ve seen someone mistake the verb &quot;delve&quot; with &quot;dwelve&quot;:<p>&gt; ...we started dwelving into the code base...<p>The author may not be a native speaker, but this is far from a judgement on their English. I&#x27;m just curious about the provenance of this mistake, given the scarcity of words that begin with &quot;dw&quot;. At first I thought it was a typo -- especially on a QWERTY keyboard -- but I&#x27;ve seen it often enough to question this.
评论 #36585548 未加载
评论 #36585965 未加载
评论 #36585621 未加载
andrewstuartalmost 2 years ago
I dropped nginx because it was really fiddly to configure and misconfiguration has potentially bad consequences.
评论 #36581790 未加载
phendrenad2almost 2 years ago
This has nothing to do with bitwarden. This is a generic directory traversal attack (enabled by Nginx&#x27;s configuration language being full of serious gotchas).
评论 #36581513 未加载
brigandishalmost 2 years ago
The article didn&#x27;t mention permissions, would this still work if the nginx user is denied permissions on things like `&#x2F;var&#x2F;log`? I <i>suspect</i> it wouldn&#x27;t but isn&#x27;t the most common cause of security flaws going to be unchecked assumptions?<p>As an aside, I didn&#x27;t know Github code search accepted regex.
评论 #36581404 未加载
kenttalmost 2 years ago
If I understand correctly, this is a vulnerability in self-hosted Bitwarden only. Is that correct?
评论 #36582875 未加载
评论 #36582540 未加载
TedDoesntTalkalmost 2 years ago
&gt; Nginx, a versatile web server pivotal to numerous internet infrastructures, has held a dominant market share since its inception in 2004<p>Horse pucky. In those days, Apache httpd held dominant market share. Nice historical hijacking.
sneakalmost 2 years ago
Note that this leaks the vault with secrets encrypted - a leak of the cyphertext.<p>&gt; <i>This vulnerability has been disclosed to Bitwarden and has since then been fixed. Bitwarden issued a US$6000 bounty, which is the highest bounty they issued on their HackerOne program.</i><p>That&#x27;s a ridiculously low payout.
评论 #36580800 未加载
评论 #36580683 未加载
评论 #36580704 未加载
qwertoxalmost 2 years ago
What would I need to grep my nginx logs for to see if my possibly misconfigured servers were exploited? [^&#x2F;]+\.\. (not adding a question mark after that regex even though I&#x27;m asking if that one would be ok)
ilytalmost 2 years ago
Don&#x27;t let web server access app&#x27;s code, soo many security problems solved...
em1saralmost 2 years ago
Okay so I self-host Vaultwarden, what do I need to do to fix the vulnerability? The article mentions another flavor of the self hosted docker image though.
评论 #36585179 未加载
评论 #36622142 未加载