Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. 🚨 Hey, so that nginx RCE targeting instances with the unnamed rewrite rule?

🚨 Hey, so that nginx RCE targeting instances with the unnamed rewrite rule?

Scheduled Pinned Locked Moved Uncategorized
5 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hrbrmstr@mastodon.socialH This user is from outside of this forum
    hrbrmstr@mastodon.socialH This user is from outside of this forum
    hrbrmstr@mastodon.social
    wrote last edited by
    #1

    🚨 Hey, so that nginx RCE targeting instances with the unnamed rewrite rule? => It's extremely common.

    That exact rule is the official recommended config from Yoast for their XML sitemaps on NGINX.

    From their help page:

    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

    This is copy-pasted verbatim by millions of WP sites running Yoast SEO (5+ million active installs) and also by sites using other SEO plugins that followed Yoast's lead. (1/3)

    hrbrmstr@mastodon.socialH 1 Reply Last reply
    2
    0
    • hrbrmstr@mastodon.socialH hrbrmstr@mastodon.social

      🚨 Hey, so that nginx RCE targeting instances with the unnamed rewrite rule? => It's extremely common.

      That exact rule is the official recommended config from Yoast for their XML sitemaps on NGINX.

      From their help page:

      rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

      This is copy-pasted verbatim by millions of WP sites running Yoast SEO (5+ million active installs) and also by sites using other SEO plugins that followed Yoast's lead. (1/3)

      hrbrmstr@mastodon.socialH This user is from outside of this forum
      hrbrmstr@mastodon.socialH This user is from outside of this forum
      hrbrmstr@mastodon.social
      wrote last edited by
      #2

      The EasyEngine tutorial, StackPointer, WPMU DEV, Stack Overflow, and the WordPress.org forums all reference this same pattern.

      This can easily be chained with one (or both) of two recent and trivial-to-exploit local privilege escalation Linux vulns.

      In the words of @krypt3ia :

      we doomed.

      HOWEVER: I threw together a small Bash script that tries to detect whether a given conf file or directory of nginx configs has vulnerable directives. You can find it at:

      https://git.sr.ht/~hrbrmstr/cve-2026-42945-scanner… (2/3)

      hrbrmstr@mastodon.socialH 1 Reply Last reply
      0
      • hrbrmstr@mastodon.socialH hrbrmstr@mastodon.social

        The EasyEngine tutorial, StackPointer, WPMU DEV, Stack Overflow, and the WordPress.org forums all reference this same pattern.

        This can easily be chained with one (or both) of two recent and trivial-to-exploit local privilege escalation Linux vulns.

        In the words of @krypt3ia :

        we doomed.

        HOWEVER: I threw together a small Bash script that tries to detect whether a given conf file or directory of nginx configs has vulnerable directives. You can find it at:

        https://git.sr.ht/~hrbrmstr/cve-2026-42945-scanner… (2/3)

        hrbrmstr@mastodon.socialH This user is from outside of this forum
        hrbrmstr@mastodon.socialH This user is from outside of this forum
        hrbrmstr@mastodon.social
        wrote last edited by
        #3

        PRs/helpful suggestions/credit to it from skeezy cyber vendors who steal it and put it in their products without compensation is welcome/encouraged (3/3)

        hrbrmstr@mastodon.socialH 1 Reply Last reply
        0
        • hrbrmstr@mastodon.socialH hrbrmstr@mastodon.social

          PRs/helpful suggestions/credit to it from skeezy cyber vendors who steal it and put it in their products without compensation is welcome/encouraged (3/3)

          hrbrmstr@mastodon.socialH This user is from outside of this forum
          hrbrmstr@mastodon.socialH This user is from outside of this forum
          hrbrmstr@mastodon.social
          wrote last edited by
          #4

          I still had a lingering nginx box with a legacy WP config (and un-upgrade-able nginx)I had to find and fix, hence the script.

          hrbrmstr@mastodon.socialH 1 Reply Last reply
          0
          • R relay@relay.mycrowd.ca shared this topic
            mttaggart@infosec.exchangeM mttaggart@infosec.exchange shared this topic
          • hrbrmstr@mastodon.socialH hrbrmstr@mastodon.social

            I still had a lingering nginx box with a legacy WP config (and un-upgrade-able nginx)I had to find and fix, hence the script.

            hrbrmstr@mastodon.socialH This user is from outside of this forum
            hrbrmstr@mastodon.socialH This user is from outside of this forum
            hrbrmstr@mastodon.social
            wrote last edited by
            #5

            OH, and FWIW the White House runs WordPress on nginx and likely has a plugin running that causes the weak nginx rewrite rule to be needed.

            1 Reply Last reply
            1
            0
            • R relay@relay.infosec.exchange shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups