<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Javascript on Thaddeus Koenig</title><link>https://www.thaddeuskoenig.com/tags/javascript/</link><description>Recent content in Javascript on Thaddeus Koenig</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Thaddeus Koenig</copyright><lastBuildDate>Fri, 16 Jan 2026 16:47:57 -0500</lastBuildDate><atom:link href="https://www.thaddeuskoenig.com/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>16JAN26 - NextJS Authentication Bypass</title><link>https://www.thaddeuskoenig.com/blog/20260116/</link><pubDate>Fri, 16 Jan 2026 15:50:00 -0500</pubDate><guid>https://www.thaddeuskoenig.com/blog/20260116/</guid><description>&lt;h2 id="intro"&gt;Intro&lt;a href="#intro" class="post-heading__anchor" aria-hidden="true"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Today while messing around with one of the HackTheBox retired machines &amp;ldquo;Previous&amp;rdquo;, the method of gaining initial access is due to the &amp;ldquo;Middleware&amp;rdquo; Authentication Bypass in Next.js. This vulnerability can be exploited to bypass authorization and access sensitive pages. Details of the affected versions can be found here &lt;a
 href="https://www.cve.org/CVERecord?id=CVE-2025-29927"
 
 
 class="link--external" target="_blank" rel="noreferrer"
 
&gt;CVE-2025-29927&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;a href="#background" class="post-heading__anchor" aria-hidden="true"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The CVE is a vulnerability in the handling of &amp;ldquo;middleware&amp;rdquo;. In its simplest terms (the only ones I understand) middleware is a function used to process a user request in some form or fashion. This could be as simple as parsing raw data into a JSON template, or as much as providing authentication to an application that doesn&amp;rsquo;t have any. In the case of the HackTheBox machine, this was the case. The application uses &lt;a
 href="https://next-auth.js.org/"
 
 
 class="link--external" target="_blank" rel="noreferrer"
 
&gt;Next Auth&lt;/a&gt; as its authentication provider. In an incredibly oversimplified piece of pseudocode, authentication in this application looks like this (forgive me im not a javascipt developer).&lt;/p&gt;</description></item></channel></rss>