Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Security Apache

Apache Fixes Actively Exploited Web Server Zero-day (therecord.media) 34

The Apache Software Foundation has released a security patch to address a vulnerability in its HTTP Web Server project that has been actively exploited in the wild. From a report: Tracked as CVE-2021-41773, the vulnerability affects only Apache web servers running version 2.4.49 and occurs because of a bug in how the Apache server converts between different URL path schemes (a process called path or URI normalization). "An attacker could use a path traversal attack to map URLs to files outside the expected document root," the ASF team said in the Apache HTTP Server 2.4.50 changelog. "If files outside of the document root are not protected by 'require all denied' these requests can succeed. Additionally this flaw could leak the source of interpreted files like CGI scripts," Apache engineers added. More than 120,000 servers currently exposed online to attacks.
This discussion has been archived. No new comments can be posted.

Apache Fixes Actively Exploited Web Server Zero-day

Comments Filter:
  • by Joce640k ( 829181 ) on Tuesday October 05, 2021 @10:50AM (#61863229) Homepage

    Oh, great. I literally just set up a server with that version (it was the current version last week).

    • by The-Ixian ( 168184 ) on Tuesday October 05, 2021 @11:10AM (#61863289)

      Seems to me that directory traversal bugs should be top of mind when doing QA on a web server.

    • by Joce640k ( 829181 ) on Tuesday October 05, 2021 @12:06PM (#61863485) Homepage

      Update: Half an hour wasted because this line works in Apache 2.4.49 (and previous versions) but not in 2.4.50

      # PHP plugin
      LoadModule php_module "C:/apache24/php-8.0.11/php8apache2_4.dll"

      Clue: Remove the quotes from around the file name

      • by rduke15 ( 721841 ) <rduke15.gmail@com> on Tuesday October 05, 2021 @04:39PM (#61864579)

        According to the linked article, it does NOT work on previous versions. I have 2.4.38. And indeed, if I try the example from a tweet in the article:
        curl "https://my.example.com/whatever/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/etc/passwd"
        I just get

        <title>400 Bad Request</title> ...
        <h1>Bad Request</h1>
        <p>Your browser sent a request that this server could not understand. ...

    • by bustinbrains ( 6800166 ) on Tuesday October 05, 2021 @12:07PM (#61863487)

      Use the package manager and then make sure automatic updates are working. The major distro package managers (apt, yum, etc.) already have patched versions of Apache in place and are deploying those updates globally over the next 24 to 48 hours.

      Apache is fairly out of date these days given it can only handle about 120 simultaneous connections (by default and is controlled at compile-time rather than being a configurable setting) and each web browser connecting in will use 2-4 connections thereby limiting Apache to around 30-60 simultaneous users. If WebSocket is in the mix, then the Apache execution model is very severely outdated. Nginx or HAProxy as a frontloader to an Apache backend is a much better option and can handle anywhere from thousands to 10's of thousands of connections on a single system and helps to minimize vulnerabilities in Apache that come up.

    • by Anonymous Coward on Tuesday October 05, 2021 @06:50PM (#61864971)

      Well that was dumb. Use Nginx. Apache is bloated hot garbage.

      Nginx has had 31 vulnerabilities in 12 years. That's 2.6 vulns per year. The most ever is 4 vulns in a year.

      Now look at Apache. 226 vulnerabilities in 22 years. That's over 10 vulns per year. Some years had 20 vulns!

      Get off the sinking ship.

  • by NormalVisual ( 565491 ) on Tuesday October 05, 2021 @11:10AM (#61863291)

    "More than 120,000 servers currently exposed online to attacks."

    Do the editors here actually DO anything?

  • by The Evil Atheist ( 2484676 ) on Tuesday October 05, 2021 @12:25PM (#61863561)
    Aren't containers supposed to avoid all that shit in the first place?
    • Re:Containers (Score:2, Insightful)

      by Anonymous Coward on Tuesday October 05, 2021 @12:47PM (#61863655)

      No.

      • by ArchieBunker ( 132337 ) on Tuesday October 05, 2021 @01:41PM (#61863887)

        Containers are a symptom of dependency hell. Too many libraries and a development environment so convoluted that only the author can recreate it. So instead of fixing the problem it's now managed by containers.

        • by Anonymous Coward on Tuesday October 05, 2021 @03:20PM (#61864307)

          Containers are a symptom of dependency hell. Too many libraries and a development environment so convoluted that only the author can recreate it. So instead of fixing the problem it's now managed by containers.

          Or just statically link everything. That works too given fact Linux is an impossibly fragmented disaster for software distribution.

          • by Anonymous Coward on Tuesday October 05, 2021 @07:15PM (#61865039)

            Or just statically link everything. That works too given fact Linux is an impossibly fragmented disaster for software distribution.

            Let's hide all the dependencies! And then have to patch every hidden copy of vulnerable libraries! That I don't know exist!

        • by The Evil Atheist ( 2484676 ) on Tuesday October 05, 2021 @05:31PM (#61864769)
          I'm merely talking about access to files outside of a context. This URL normalization business would have no effect if it ended up pointing to something outside the container.

          That's my understanding of what containers were originally designed for - restricted usage of system resources.
          • by Anonymous Coward on Tuesday October 05, 2021 @07:06PM (#61865007)

            Depends on whether anything accessible to the container is sensitive.

            E.g. password files, password-protected parts of the web root, scripts with embedded secret data or logic, data used by scripts but not downloadable itself, log files, etc.

            You'd likely want something more fine grained, like AppArmor or pledge(), that works on paths rather than an entire container or VM.

            • by The Evil Atheist ( 2484676 ) on Tuesday October 05, 2021 @09:01PM (#61865313)
              My point is you don't want something fine-grained. You want, if at all possible, a whitelist of one directory. URLs pointing to anything outside that directory is considered non-existent. Fine-grained security is leaky security.

              My understanding of containers is limited, but I was under the impression that containers can be limited to only allow access to specific directories. So if the application doesn't support whitelists well, or is buggy, then it still can't escape the container.
              • by Anonymous Coward on Tuesday October 05, 2021 @09:40PM (#61865387)

                My point is you don't want something fine-grained. You want, if at all possible, a whitelist of one directory. URLs pointing to anything outside that directory is considered non-existent. Fine-grained security is leaky security.

                Access by directory (tree) is more fine-grained than by entire container! :-)

                My understanding of containers is limited, but I was under the impression that containers can be limited to only allow access to specific directories. So if the application doesn't support whitelists well, or is buggy, then it still can't escape the container.

                The point is that there are portions of the container that the software inside may need to run but you still don't want exposed.

                Imagine that you are using Apache basic access control for part of your web root. The Apache config files and the password file are within (or accessible by) the container, so limiting the bad guy's access to just the container is still harmful.

                See previous posts for other examples.

                • by The Evil Atheist ( 2484676 ) on Wednesday October 06, 2021 @12:27PM (#61866771)

                  Access by directory (tree) is more fine-grained than by entire container! :-)

                  It isn't. It's a full-lock down. It's very easy to audit - how many directories is accessible? One. Which one? That one. Job done. That's very course grained. No ifs, no buts.

                  so limiting the bad guy's access to just the container is still harmful.

                  But I'm asking if there are container implementations that can further limit access, not just to the container itself. Is there, like, something you can do with kernel namespaces that limits an application to ever only be able to access one directory specified on startup. Take it away from the server's responsibility entirely.

                  • by Anonymous Coward on Wednesday October 06, 2021 @07:45PM (#61867845)

                    Access by directory (tree) is more fine-grained than by entire container! :-)

                    It isn't. It's a full-lock down. It's very easy to audit - how many directories is accessible? One. Which one? That one. Job done. That's very course grained. No ifs, no buts.

                    so limiting the bad guy's access to just the container is still harmful.

                    But I'm asking if there are container implementations that can further limit access, not just to the container itself. Is there, like, something you can do with kernel namespaces that limits an application to ever only be able to access one directory specified on startup. Take it away from the server's responsibility entirely.

                    You're ignoring the lockdown features mentioned already and saying that you want a "container implementation" to accomplish the same thing. I guess that seems simpler but you're also ignoring explanations of why limiting process access to a single directory either doesn't work or doesn't help.

                    Let's start a process in a container with only access to one directory, the web root. Oops, exec() just failed because the apache program isn't in that one directory. Neither are the Apache and OS libraries and configuration files under /var/ and /etc/. We could allow read-only access to those paths but you've ruled that out. Where should I put secret password files? Write-only log files? How do I access device files without /dev/?

    • by Anonymous Coward on Tuesday October 05, 2021 @05:56PM (#61864839)
      You're probably thinking of jails (e.g. of the "chroot" variety), which are indeed designed specifically to protect against this sort of thing.
      • by Anonymous Coward on Tuesday October 05, 2021 @07:12PM (#61865025)

        Protection at jail, container, or VM granularity isn't sufficient if they contain any data you don't want exposed. See https://apache.slashdot.org/co... [slashdot.org] for examples.

        They can make attacks on the enclosing system more complex. But without other mechanisms they do not protect data within them if breached.

If you think nobody cares if you're alive, try missing a couple of car payments. -- Earl Wilson

Working...