<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Debasishtripathy on Medium]]></title>
        <description><![CDATA[Stories by Debasishtripathy on Medium]]></description>
        <link>https://medium.com/@debasishtripathy7987?source=rss-4ee95af2b083------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EF6Fsjg4sv7gUd3V</url>
            <title>Stories by Debasishtripathy on Medium</title>
            <link>https://medium.com/@debasishtripathy7987?source=rss-4ee95af2b083------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 22:22:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@debasishtripathy7987/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How a Login Link Could Switch kChat to an Attacker’s Server]]></title>
            <link>https://medium.com/@debasishtripathy7987/how-a-login-link-could-switch-kchat-to-an-attackers-server-6a1601e3cd9a?source=rss-4ee95af2b083------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a1601e3cd9a</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Debasishtripathy]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 12:17:19 GMT</pubDate>
            <atom:updated>2026-11-17T12:18:28.214Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A High severity Android finding involving deep link validation, push token disclosure, and messages sent to an attacker controlled workspace.</em></p><p><strong>Debasish Tripathy</strong> · Application security research</p><blockquote><strong><em>Private review draft — not cleared for publication.</em></strong><em> The program rules supplied with this report prohibit partial and full disclosure. Obtain Infomaniak’s written approval for this article and any accompanying images before publishing. This draft contains no bounty information.</em></blockquote><p>A login link in kChat for Android could decide which server the app trusted.</p><p>The app took a server address from an incoming deep link and passed it into its magic link login flow without checking that the address belonged to a legitimate kChat server. With a compatible server under my control, I could make the official app send me its device push token and provision my server as a workspace.</p><p>The impact extended beyond that first request. Once the attacker’s workspace became active, messages subsequently typed there went to the attacker’s server.</p><p>I reported the issue through YesWeHack. Infomaniak validated it, reassessed it as <strong>High severity with a CVSS v3.1 score of 7.1</strong>, and released a fix. I verified that the behavior no longer reproduced in the updated Play Store build.</p><h3>The entry point was a login deep link</h3><p>Deep links let a website or another app open a particular screen or action inside a mobile app. A login link can carry the information needed to complete authentication without making the user enter it manually.</p><p>That also makes the link an input to a sensitive operation.</p><p>In the affected kChat build, Android registered custom URL schemes including kchat://, kChat://, and mmauthbeta:// as browsable links. A website could therefore present a link that Android would hand to kChat when the user opened it.</p><p>The relevant route had this structure:</p><pre>kchat://&lt;server-address&gt;/login/one_time_link?t=&lt;token&gt;</pre><p>The handler extracted two values: the server address and the token in the t parameter. It checked that the token matched a 64-character lowercase alphanumeric format.</p><p>It did not establish whether the server address was trusted before invoking the login flow.</p><p>This mattered because the address determined where the app would send the login request and which server it would add to its local configuration. The token format check offered no protection against a server that the attacker controlled and could make accept the request.</p><h3>Following the address through the app</h3><p>The source analysis in my report followed the input across four parts of the app:</p><p>ComponentRelevant behaviorandroid/app/src/main/AndroidManifest.xmlRegistered the browsable custom schemes.app/utils/deep_link/index.tsMatched the magic link route and passed the extracted server address and token into magicLinkLogin.app/actions/remote/session.tsResolved the server address, created a client, performed login, and created local server state.app/client/rest/users.tsSent the magic link token and device identifier to the selected server.</p><p>An unknown server could enter the magic link login branch directly. The flow resolved the supplied address with a HEAD request, followed redirects, fetched client configuration, and proceeded with login.</p><p>This is a simplified representation of the sequence documented in the report, rather than a verbatim source excerpt:</p><pre>serverUrl, token = parseIncomingLink(link)<br>resolvedUrl = getServerUrlAfterRedirect(serverUrl)<br>client = createClient(resolvedUrl)<br>client.getClientConfigOld()<br>client.loginByMagicLinkLogin(token, getDeviceToken())<br>createServerDatabase(resolvedUrl)</pre><p>The missing check belonged before the app contacted the supplied destination or sent device information to it. Redirect handling also mattered: a trusted starting address would provide little protection if resolution could finish at an untrusted host.</p><p>The report noted another useful detail. Although the app had removed the multi-server “add server” interface, this deep link path still allowed an unknown server to be provisioned. Removing the visible interface had left another route to the same underlying capability.</p><h3>Reproducing it in the distributed app</h3><p>I reproduced the issue on the official Play Store build, <strong>kChat v1.0.48</strong>, while logged in, using a Samsung SM-A166P running Android 16.</p><p>For the proof of concept, I used an HTTPS endpoint under my control that answered the configuration, health check, and login requests expected by the client. A minimal Mattermost-compatible stub was enough to reach the relevant behavior.</p><p>The test used a server I controlled and a token value I supplied. It did not require a valid login token for the user’s legitimate workspace.</p><p>After the deep link reached the app, my server received a login request containing both the supplied magic link token and the device push registration token. The structure was:</p><pre>POST /api/v4/users/login<br>Content-Type: application/json</pre><pre>{<br>  &quot;magic_link_token&quot;: &quot;&lt;researcher-supplied value&gt;&quot;,<br>  &quot;device_id&quot;: &quot;&lt;device push token — redacted&gt;&quot;<br>}</pre><p>The server log established that device information had crossed to the selected destination. App logs and the resulting workspace state supported the separate finding that the app had provisioned the unknown server.</p><p>The report included an ADB trigger for repeatability. That command delivered the same type of Android VIEW intent used by the deep link path; it was a testing convenience. The reported user-facing scenario involved opening a link from a web page, including Android’s app-opening confirmation where shown. Exploitation required user interaction.</p><p>The minimal stub also had a practical limitation: it did not implement every API the app expected, so some screens could fail to load. A connection error alone would have been weak evidence. The login request received by my server, combined with the app’s server state, was much more useful for establishing what had happened.</p><h3>Why the workspace switch changed the impact</h3><p>The initial report focused on the push token disclosure and unauthorized server provisioning.</p><p>Those were observable consequences, but the active workspace also determined the destination for later messages. When the app switched to the attacker’s workspace, content entered there was sent to the attacker’s server.</p><p>On <strong>14 October 2026</strong>, Infomaniak updated the assessment after considering the additional demonstrated impact. The revised assessment recorded continuous disclosure of communications typed in the app after the switch, together with a change to the app’s configuration and rendered content.</p><p>The final vector was:</p><pre>CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N</pre><p>That corresponds to <strong>7.1 — High</strong>. User interaction remained required. The revised confidentiality impact reflected the subsequent communications; the integrity impact reflected the attacker’s ability to alter the app’s workspace state and content.</p><p>The distinction between existing and subsequent data is essential here. The evidence established disclosure of the push token and messages entered into the attacker’s active workspace. It did not establish access to previous conversations on the legitimate server, theft of the user’s existing account session, or compromise of Infomaniak’s backend infrastructure.</p><p>Likewise, possession of a push registration token was not evidence that arbitrary push messages could be sent or intercepted. The report’s stronger confidentiality finding came from where subsequent application messages were delivered.</p><h3>The vulnerability class</h3><p>The clearest description of the root cause is <strong>insufficient validation of deep link parameters leading to unauthorized server configuration</strong>.</p><p>The program categorized the report as SSRF, under CWE-918. In the reproduced flow, the requests originated from the Android client. That distinction matters when describing the attack surface: the evidence showed a mobile app being induced to contact and trust an attacker selected destination.</p><p>For mobile testing, this fits the broader category of insecure deep link handling. <a href="https://mas.owasp.org/MASWE/MASVS-PLATFORM/MASWE-0029/">OWASP’s MASWE-0029</a> covers insecure deep links and input validation in their handlers. <a href="https://developer.android.com/privacy-and-security/risks/unsafe-use-of-deeplinks">Android’s security guidance</a> also calls for validating incoming parameters and checking relevant application state before sensitive operations.</p><p>In this case, a value obtained from an external link became the authority for choosing a backend. Once that decision was made, the app’s normal configuration and messaging behavior carried the impact forward.</p><h3>What was fixed</h3><p>My original remediation recommendation was to validate the supplied server address and its resolved destination against the legitimate kChat hosts before login or server provisioning. Redirects needed the same restrictions, and device information should only be sent after the destination was established as trusted.</p><p>The remediation recorded in my fix verification notes removed the affected magic link login path. Links pointing to an unknown server no longer caused the app to provision that server.</p><p>On <strong>5 November 2026</strong>, I recorded a retest against <strong>kChat v1.0.51</strong>, version code 100051001, from the Play Store, using the same device as the original proof of concept.</p><p>The app still opened when it received the deep link, but it stayed on the legitimate workspace. I observed no request to the attacker endpoint, no login POST carrying the device token, and no creation of local server state for that endpoint.</p><p>These checks addressed both parts of the original finding: the initial device information disclosure and the workspace change that enabled later message disclosure.</p><h3>Disclosure timeline</h3><p>DateEvent5 October 2026Submitted the initial report through YesWeHack.6 October 2026Infomaniak validated and accepted the finding.14 October 2026Infomaniak reassessed the additional impact and raised the score from 4.3 to 7.1.15 October 2026The team requested verification of a new release.5 November 2026Recorded fix verification on Play Store version 1.0.51.17 November 2026The report was closed as resolved.</p><h3>What I would check in a similar review</h3><p>This finding makes server selection a useful place to focus when reviewing mobile authentication links. If a link contains a host, tenant, workspace, or environment address, follow that value until the app uses it to make a request or persist configuration.</p><p>Check when the destination becomes trusted, what information is sent before that point, and whether a redirect can change the decision. Then look at the application state after login. A server added during authentication can become the recipient of data entered much later.</p><p>For kChat, the first visible leak was a push token. Following the resulting workspace state established the more significant confidentiality impact and gave the team a clearer basis for reassessing the report.</p><p>Thanks to the <strong>Infomaniak Security Team</strong> for reviewing the additional evidence and involving me in fix verification, and to <strong>YesWeHack</strong> for providing the reporting platform.</p><h3>References</h3><ul><li>Research record: YesWeHack report YWH-PGM7461-3803, its assessment updates, and the recorded fix verification. The report is the source for the product-specific findings in this draft.</li><li><a href="https://developer.android.com/privacy-and-security/risks/unsafe-use-of-deeplinks">Android Developers: Unsafe use of deep links</a>.</li><li><a href="https://mas.owasp.org/MASWE/MASVS-PLATFORM/MASWE-0029/">OWASP Mobile Application Security: MASWE-0029 — Insecure Deep Links</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Fjb0muXiVimrkvl2IUlmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BqUy4F14VtWxb2IbT74UBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nJ8YXBuOri7jbyFa-t3dOA.png" /></figure><p>#AndroidSecurity #ApplicationSecurity #ResponsibleDisclosure</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a1601e3cd9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>