TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hunting for Nginx alias traversals in the wild

534 点作者 celesian将近 2 年前

20 条评论

evgpbfhnr将近 2 年前
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 未加载
542458将近 2 年前
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 未加载
amluto将近 2 年前
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 未加载
technion将近 2 年前
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 未加载
HenriTEL将近 2 年前
&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.
Decabytes将近 2 年前
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.
gostsamo将近 2 年前
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 未加载
kibwen将近 2 年前
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 未加载
whiskeymikey将近 2 年前
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 未加载
jand将近 2 年前
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 未加载
Xophmeister将近 2 年前
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 未加载
andrewstuart将近 2 年前
I dropped nginx because it was really fiddly to configure and misconfiguration has potentially bad consequences.
评论 #36581790 未加载
phendrenad2将近 2 年前
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 未加载
brigandish将近 2 年前
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 未加载
kentt将近 2 年前
If I understand correctly, this is a vulnerability in self-hosted Bitwarden only. Is that correct?
评论 #36582875 未加载
评论 #36582540 未加载
TedDoesntTalk将近 2 年前
&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.
sneak将近 2 年前
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 未加载
qwertox将近 2 年前
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)
ilyt将近 2 年前
Don&#x27;t let web server access app&#x27;s code, soo many security problems solved...
em1sar将近 2 年前
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 未加载