<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TUI on JJGadgets</title><link>https://6f8f7e98.jjgadgets-tech.pages.dev/tags/tui/</link><description>Recent content in TUI on JJGadgets</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>JJGadgets</copyright><lastBuildDate>Wed, 15 Nov 2023 10:00:00 +0800</lastBuildDate><atom:link href="https://6f8f7e98.jjgadgets-tech.pages.dev/tags/tui/index.xml" rel="self" type="application/rss+xml"/><item><title>CVE-2023-43809: My experience with my first CVE</title><link>https://6f8f7e98.jjgadgets-tech.pages.dev/2023/cve-2023-43809/</link><pubDate>Wed, 15 Nov 2023 10:00:00 +0800</pubDate><guid>https://6f8f7e98.jjgadgets-tech.pages.dev/2023/cve-2023-43809/</guid><description>&lt;h2 id="disclaimer">Disclaimer&lt;/h2>
&lt;p>Everything in this post is my perspective, opinions and experience, and does not represent anyone else but myself. Also, I will be using Markdown URL texts for non-vulnerability-related links, but please, always check what link you&amp;rsquo;re about to click on or visit, as part of general internet safety practices.&lt;/p>
&lt;h2 id="about-soft-serve-my-opinions">About Soft Serve (my opinions)&lt;/h2>
&lt;p>Simple but very effective self-hosted Git server (and now local browser!), with an amazing TUI and CLI over SSH.&lt;/p>
&lt;p>I selfhost Soft Serve on my home Kubernetes cluster, for private projects.&lt;/p>
&lt;h2 id="vulnerability-info">Vulnerability Info&lt;/h2>
&lt;p>Soft Serve Public Key Authentication Bypass Vulnerability when Keyboard-Interactive SSH Authentication is Enabled&lt;/p>
&lt;p>&lt;strong>My tl;dr:&lt;/strong> if public key needs client-side verification, and &lt;code>allow-keyless&lt;/code> is enabled which turns on &lt;code>keyboard-interactive&lt;/code>, public key can match an account but bypass (fail) client-side validation and successfully login on Soft Serve servers.&lt;/p>
&lt;p>Find out more on the GHSA page &lt;a class="link" href="https://github.com/advisories/GHSA-mc97-99j4-vm2v" target="_blank" rel="noopener"
>https://github.com/advisories/GHSA-mc97-99j4-vm2v&lt;/a> or the MITRE page &lt;a class="link" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-43809" target="_blank" rel="noopener"
>https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-43809&lt;/a> or my GitHub issue on it &lt;a class="link" href="https://github.com/charmbracelet/soft-serve/issues/389" target="_blank" rel="noopener"
>https://github.com/charmbracelet/soft-serve/issues/389&lt;/a>.&lt;/p>
&lt;h2 id="experience-with-developers-good">Experience with Developers (Good!)&lt;/h2>
&lt;p>The Charm team have been professional about handling this with minimal friction during the disclosure process, with regular progress updates and swift responses as they confirmed the vulnerability and worked to find the root cause and fix it.&lt;/p>
&lt;h2 id="my-pov">My POV&lt;/h2>
&lt;p>So here comes what I consider the most unexpected way to find a vulnerability ever. I won&amp;rsquo;t be surprised if you think it&amp;rsquo;s a fake story, but I know for sure it was real. &lt;del>Else I wouldn&amp;rsquo;t have got my lazy ass to write a post about it, would I?&lt;/del>&lt;/p>
&lt;p>I am aboard a public bus, and my destination is only a few stops away, within 10 minutes.&lt;/p>
&lt;p>I tapped my Android phone, which has a virtual wallet card registered to the NFC, to board the bus. Found a seat, opened Termux.&lt;/p>
&lt;p>&amp;ldquo;Hmm, what should I do?&amp;rdquo; Undecided, I fiddle with k9s to look at the list of pods, wondering which app to mess with. &amp;ldquo;Ah, I got it, I need to reconfigure my Soft Serve after screwing around with making sure &lt;a class="link" href="https://github.com/charmbracelet/soft-serve/issues/363" target="_blank" rel="noopener"
>the PostgreSQL support was fully working&lt;/a> on the &lt;a class="link" href="https://github.com/charmbracelet/soft-serve/releases/tag/v0.6.0" target="_blank" rel="noopener"
>latest release&lt;/a>.&amp;rdquo;&lt;/p>
&lt;p>&amp;ldquo;Damn, HelmRelease didn&amp;rsquo;t update, lemme fix that&amp;hellip; okay, good to go.&amp;rdquo; &lt;code>ssh softserve&lt;/code> &amp;ldquo;Now, need my YubiKey to authenticate Soft Serve&amp;rsquo;s SSH with my YubiKey&amp;rsquo;s PGP SSH key&amp;hellip;&amp;rdquo;&lt;/p>
&lt;p>&lt;strong>&amp;ldquo;Shit, it&amp;rsquo;s my stop, doors are about to close!&amp;rdquo;&lt;/strong> I literally jump up from my seat with one foot launching me forward, one hand grabbing onto my YubiKey, and one hand holding my Android phone with OpenKeychain prompt open.&lt;/p>
&lt;p>And, the moment: &lt;em>taps phone&amp;rsquo;s NFC card to alight bus, foreground app switches from Termux with OpenKeychain prompt to virtual wallet app, alights and switches back to Termux&lt;/em> &amp;ldquo;Wait&amp;hellip; &lt;strong>why am I logged in?&lt;/strong> I don&amp;rsquo;t remember even plugging the YubiKey in&amp;hellip;&amp;rdquo;&lt;/p>
&lt;p>I kill the SSH session, &lt;code>ssh softserve&lt;/code> again, and when OpenKeychain prompt came up this time, I intentionally clicked &amp;ldquo;Cancel&amp;rdquo;. To my shock, I was logged in again, YubiKey having never been plugged in. &lt;strong>This was no accident nor was I seeing things.&lt;/strong>&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Side note&lt;/strong>: Funny enough, I had &lt;a class="link" href="https://github.com/charmbracelet/soft-serve/issues/380" target="_blank" rel="noopener"
>filed an issue&lt;/a> on the bus ride back home for not being able to change &lt;code>allow-keyless&lt;/code> and &lt;code>anon-access&lt;/code> settings when PostgreSQL was used, which led to 0.6.1 being released, and opted to properly test and report this vulnerability when I got home. I didn&amp;rsquo;t know at the time that it would be the very setting that would mitigate this vulnerability if Soft Serve users couldn&amp;rsquo;t yet update to a patched version of 0.6.2 and above. So if you look at it a certain way, I was basically the reason for all the patch versions of the 0.6.x version family being released. All done from an Android phone. Oops!&lt;/p>
&lt;/blockquote>
&lt;h2 id="timeline-gmt8">Timeline (GMT+8)&lt;/h2>
&lt;p>&lt;strong>12 September 2023&lt;/strong>: I found the potential vulnerability.&lt;/p>
&lt;p>&lt;strong>15 September 2023&lt;/strong>: I reported the vulnerability in a thread on the Charm Discord server with a description and listing the environments that I used to reproduce the vulnerability. Devs acknowledged and stated they would look into it.&lt;/p>
&lt;p>&lt;strong>16 September 2023&lt;/strong>: I screen recorded a PoC video using my Android, and reported my further discovery that turning &lt;code>allow-keyless&lt;/code> off seemed to mitigate the vulnerability, amongst other details.&lt;/p>
&lt;p>&lt;strong>17-22 September 2023&lt;/strong>: Further communications between me and dev to identify the root cause.&lt;/p>
&lt;p>&lt;strong>27 September 2023&lt;/strong>: PR with patched code opened and merged.&lt;/p>
&lt;p>&lt;strong>28 September 2023&lt;/strong>: I tested that the nightly build with the patch PR merged does fix the issue, and opened the GitHub issue for public transparency.&lt;/p>
&lt;p>&lt;strong>3 October 2023&lt;/strong>: v0.6.2 patch version released with verified fix, GitHub Security Advisory (GHSA) filed and I accepted credit. GitHub issue closed as completed.&lt;/p>
&lt;p>&lt;strong>5 October 2023&lt;/strong>: CVE-2023-43809 was published.&lt;/p></description></item></channel></rss>