Lucene search
K

Journyx 11.5.4 Cross Site Scripting Vulnerability

🗓️ 08 Aug 2024 00:00:00Reported by Jaggar HenryType 
zdt
 zdt
🔗 0day.today👁 221 Views

Journyx 11.5.4 Cross Site Scripting Vulnerability in GNU/Linu

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2024-6892
8 Aug 202403:01
circl
CVE
CVE-2024-6892
7 Aug 202423:19
cve
Cvelist
CVE-2024-6892 Journyx Reflected Cross Site Scripting
7 Aug 202423:19
cvelist
KoreLogic Security
Journyx Reflected Cross Site Scripting
7 Aug 202400:00
korelogic
Nuclei
Journyx 11.5.4 - Reflected Cross Site Scripting
8 Jun 202604:09
nuclei
NVD
CVE-2024-6892
8 Aug 202400:15
nvd
Packet Storm
Journyx 11.5.4 Cross Site Scripting
8 Aug 202400:00
packetstorm
Positive Technologies
PT-2024-37933 · Journyx · Journyx
7 Aug 202400:00
ptsecurity
Vulnrichment
CVE-2024-6892 Journyx Reflected Cross Site Scripting
7 Aug 202423:19
vulnrichment
Title: Journyx Reflected Cross Site Scripting
Publication URL: https://korelogic.com/Resources/Advisories/KL-001-2024-009.txt


1. Vulnerability Details

      Affected Vendor: Journyx
      Affected Product: Journyx (jtime)
      Affected Version: 11.5.4
      Platform: GNU/Linux
      CWE Classification: CWE-81: Improper Neutralization of Script in an Error
                          Message Web Page
      CVE ID: CVE-2024-6892


2. Vulnerability Description

      Attackers can craft a malicious link that once clicked
      will execute arbitrary JavaScript in the context of
      the Journyx web application.


3. Technical Description

      During the active directory login flow, if an error
      occurs, the user is redirected to a page containing
      an error message outlining the problem. The error
      message shown in the page response is derived from
      the "error_description" query parameter that appears
      in the URL. This parameter is not sanitized or validated
      prior to being reflected, allowing for an attacker to
      insert malicious HTML/JavaScript into the "error_description"
      parameter.

      This vulnerability can be exploited regardless of whether
      active directory authentication has been configured for the
      Journyx instance.


4. Mitigation and Remediation Recommendation

      The vendor reports that this issue was remediated in Journyx
      v13.0.0.

      For self-hosted instances of JournyX, additional security
      measures (such as input sanitization) can be added by monkey
      patching the PYC file responsible for handling request
      parameters (mycgi.pyc).

      1) Rename "mycgi.pyc" to an alternative name, e.g. mycgi_original.pyc.
           $ mv wt_tar/pi/pylib/wtlib/mycgi.py wt_tar/pi/pylib/wtlib/mycgi_original.py

      2) Create a file named "mycgi.py" in the same directory.
           $ touch wt_tar/pi/pylib/wtlib/mycgi.py

      3) Insert the following code into the newly created "mycgi.py"

           from mycgi_original import *
           from html import escape

           def patch():
               pdata = _parse()

               # force the value of "end_URL" to always be "wte"
               if pdata.get('end_URL'): pdata['end_URL'] = ['wte']

               # sanitize user-controlled error messages
               for parameter in ['error', 'error_description']:
                   if not pdata.get(parameter): continue
                   pdata[parameter] = [escape(value) for value in pdata[parameter]]

               return pdata

           _parse = parse
           parse  = patch

      Once these changes have been made, the JournyX native "mycgi.parse()"
      function will be overwritten with the "patch()" function located in the
      "mycgi.py" file. Relevant to this advisory, the patch provided above
      will replace special characters with their respective HTML entity
      representation for the "error" and "error_description" parameters. This
      list of parameters can be extended as needed.

      Additionally, if SSO is not required, requests to /jtcgi/r/adlogin/sso
      could be dropped without forwarding invoking FastCGI via a ModSecurity
      rule like the one below:

           SecRule REQUEST_URI "@contains adlogin/sso" "id:4,phase:2,deny,log,auditlog"


5. Credit

      This vulnerability was discovered by Jaggar Henry of KoreLogic, Inc.


6. Disclosure Timeline

      2024.01.31 - KoreLogic notifies Journyx support of the intention to
                   report vulnerabilities discovered in the licensed,
                   on-premises version of the product.
      2024.01.31 - Journyx acknowledges receipt.
      2024.02.02 - KoreLogic requests a meeting with Journyx support to share
                   vulnerability details.
      2024.02.07 - KoreLogic reports vulnerability details to Journyx.
      2024.02.09 - Journyx responds that this vulnerability has been remediated
                   in the cloud-hosted version of the product.
      2024.02.21 - KoreLogic offers to test the cloud version to confirm
                   the fix; no response.
      2024.07.01 - KoreLogic notifies Journyx of impending public disclosure.
      2024.07.09 - Journyx confirms version number of the remediation.
      2024.08.07 - KoreLogic public disclosure.


7. Proof of Concept

     The following URL contains the "error_description"
     parameter with a value of "%3Csvg%2fonload%3dprompt(%27KoreLogic%27)%3E":

http://redacted.com:8080/jtcgi/r/adlogin/sso?code=1337&state=foobar&id_token=zoinks&error_description=%3Csvg%2fonload%3dprompt(%27KoreLogic%27)%3E&error=error

     This value is automatically URL decoded to "<svg/onload=prompt('KoreLogic')>"
     and reflected into the page response:

         <div class="errorMessage">
             Unable to complete sign-on attempt. This is possibly a configuration error in the application registration 
on the Identity Provider (IdP) side. The IdP server said:
             <p>error <b><svg onload="prompt('KoreLogic')"></svg></b></p>
         </div>

     Once this link is clicked or visited in a browser, the
     javascript function "prompt()" is executed, and a display
     box is presented, thereby validating the execution of
     arbitrary JavaScript.

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 Aug 2024 00:00Current
6.2Medium risk
Vulners AI Score6.2
CVSS 3.16.1
EPSS0.07512
SSVC
221