jfrog.com
Open in
urlscan Pro
108.138.26.5
Public Scan
URL:
https://jfrog.com/blog/xz-backdoor-attack-cve-2024-3094-all-you-need-to-know/
Submission: On April 01 via api from US — Scanned from DE
Submission: On April 01 via api from US — Scanned from DE
Form analysis
4 forms found in the DOMGET https://jfrog.com/
<form role="search" method="get" action="https://jfrog.com/">
<div class="search-wrap">
<input type="search" placeholder="Search..." name="s" value="" aria-label="Search">
</div>
</form>
GET https://jfrog.com/
<form role="search" method="get" action="https://jfrog.com/">
<div class="search-wrap">
<input type="search" placeholder="Search..." name="s" value="" aria-label="Search">
</div>
</form>
<form id="newsletter" class="JFROG-CAPTCHA mw-100" novalidate="novalidate">
<div class="form-row">
<input name="email" type="email" class="form-control mb-3" id="pld_email" placeholder="Email address*">
</div>
<div class="form-row">
<input name="jf_terms" class="magic-checkbox" type="checkbox" id="terms_cons" value="" required="">
<label class="jf-check mb-0" for="terms_cons">
<p>I have read and agreed to the <a class="black bold" href="/privacy-policy/" target="_blank" rel="noopener">Privacy Policy</a></p>
</label>
</div>
<div class="mb-2 submit-btn-container">
<button type="submit" class="btn btn-green-form" data-gac="CTA Buttons" data-gaa="Blog" data-gal="Newsletter Subscription"> Subscribe </button>
<div class="g-recaptcha" data-widget-id="0">
<div class="grecaptcha-badge" data-style="bottomright"
style="width: 256px; height: 60px; display: block; transition: right 0.3s ease 0s; position: fixed; bottom: 14px; right: -186px; box-shadow: gray 0px 0px 5px; border-radius: 2px; overflow: hidden;">
<div class="grecaptcha-logo"><iframe title="reCAPTCHA" width="256" height="60" role="presentation" name="a-1dy3e5fosbyx" frameborder="0" scrolling="no"
sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox allow-storage-access-by-user-activation"
src="https://www.recaptcha.net/recaptcha/api2/anchor?ar=1&k=6Le76nYpAAAAAFrLTZMENCv9u3eM6SGV8qUkFAHG&co=aHR0cHM6Ly9qZnJvZy5jb206NDQz&hl=de&v=moV1mTgQ6S91nuTnmll4Y9yf&size=invisible&cb=5ahr4mmem1pd"></iframe></div>
<div class="grecaptcha-error"></div><textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response"
style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea>
</div>
</div>
</div>
<input type="hidden" name="referral-url" value="">
<input type="hidden" name="is_china" value="">
<input type="hidden" name="curr_lang" value="en">
<input type="hidden" name="leadSource" value="Website Form">
<input type="hidden" name="mrkName" value="BlogSubscription">
<input type="hidden" name="gclid_field" class="gclid_field" value="">
</form>
<form id="blog_audio_request_form" class="form-style-sso JFROG-CAPTCHA pt-4">
<div class="fields-box text-left pt-0 pb-3 cmm-form-side-padding normal-fields-box">
<div class="single-field-box">
<label for="barf_fullname">Full Name*</label>
<input name="fullName" type="text" id="barf_fullname" placeholder="Your full name">
</div>
<div class="single-field-box">
<label for="startfree_email">Email*</label>
<input name="email" type="email" class="" id="startfree_email" placeholder="Your company email address">
<label class="error_label"></label>
</div>
</div>
<div class="fields-box fields-box-gray" id="start-free-mobile-submission">
<div class="checkbox-field-box col-auto pl-0 pb-5 pb-xl-0 d-flex align-items-center">
<div>
<div class="ch_container">
<input name="jf_terms" class="magic-checkbox" id="barf_terms" type="checkbox" value="">
<label class="jf-check" for="barf_terms">I have read and agree to the <a href="/privacy-policy/" target="_blank" rel="noopener noreferrer">Privacy Policy</a></label>
</div>
</div>
</div>
<div class="col-auto px-0 submit-field-box">
<button type="submit" class="btn-jf-green ml-0 mb-0 mt-0" data-gac="Trial Forms" data-gaa="evaluateCloudFreeTier" data-gal="aws"> Proceed </button>
<div class="g-recaptcha" data-widget-id="1">
<div class="grecaptcha-badge" data-style="none" style="width: 256px; height: 60px; position: fixed; visibility: hidden;">
<div class="grecaptcha-logo"><iframe title="reCAPTCHA" width="256" height="60" role="presentation" name="a-voxavx8filt5" frameborder="0" scrolling="no"
sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox allow-storage-access-by-user-activation"
src="https://www.recaptcha.net/recaptcha/api2/anchor?ar=1&k=6Le76nYpAAAAAFrLTZMENCv9u3eM6SGV8qUkFAHG&co=aHR0cHM6Ly9qZnJvZy5jb206NDQz&hl=de&v=moV1mTgQ6S91nuTnmll4Y9yf&size=invisible&cb=47fkstvgu8el"></iframe>
</div>
<div class="grecaptcha-error"></div><textarea id="g-recaptcha-response-1" name="g-recaptcha-response" class="g-recaptcha-response"
style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea>
</div>
</div>
</div>
</div>
<div class="captcha-cn">
</div>
<input type="hidden" name="referral-url" value="">
<input type="hidden" name="is_china" value="">
<input type="hidden" name="curr_lang" value="en">
</form>
Text Content
___ * Products * Solutions * Pricing * Developers * Resources * Partners * Become a JFrog Partner > * Find a JFrog Partner > * Get Help > * Community > * Documentation > * Integrations > * Applications > Use Case * Cloud Solutions * Hybrid Cloud Adoption * MLSecOps * Secure AI/ML Model Management * DevOps * Artifact Management * Tool Consolidation * CI/CD * DevSecOps * Code Scanning (SAST) * Open Source Software Managing Vulnerabilities * Software Composition Analysis * Secrets Detection * Container/Infra as a Security * Holistic E2E Software Supply Chain Security * Device/IoT * Connected Device Management Industry * Financial Services > * Automotive Industry > * Healthcare Services > * Technology & Software > * Gaming > * Government > Learning & Guides * JFrog Help Center > * Security Research > * JFrog Academy > * Events > * Webinars & Workshops > * DevOps Consulting Services > * DevOps Certification > * State of Union Report > * What are DevOps Tools? > Collateral * Resource Center > * JFrog Blog > * Customer Stories > Customer Zone * Support > Customer support, tickets and community * Manage & Troubleshoot > Renew, retrieve licenses, legal and more * MyJFrog > Cloud customer portal * Cloud Status > Service status & event subscription * JFrog Trust > How we protect you & your data The JFrog Platform Deliver Trusted Software with Speed The only software supply chain platform to give you end-to-end visibility, security, and control for automating delivery of trusted releases. Bring together DevOps, DevSecOps and MLOps teams in a single source of truth. View Platform DevOps Powering the Software that Powers the World JFrog Artifactory The Universal Artifact and ML Model Repository Manager JFrog Pipelines Enterprise Grade CI/CD and Workflow Automation JFrog Distribution Fast, Secure Distribution Across Consumption Points DevSecOps Securing your Software Supply Chain end-to-end JFrog Curation Seamlessly Curate Software Packages and ML Models JFrog Security Essentials (Xray) Integrated SCA for Software Artifacts and ML Models JFrog Advanced Security Software Supply Chain Security exposure Scanning & Real-world Impact Analysis IoT Device Management JFrog Connect IoT Device Management with DevOps Agility Contact Us 1 (800) 986-4316 Start Free * Products The JFrog Platform Deliver Trusted Software with Speed The only software supply chain platform to give you end-to-end visibility, security, and control for automating delivery of trusted releases. Bring together DevOps, DevSecOps and MLOps teams in a single source of truth. View Platform * DevOps Powering the Software that Powers the World * JFrog Artifactory The Universal Artifact and ML Model Repository Manager * JFrog Pipelines Enterprise Grade CI/CD and Workflow Automation * JFrog Distribution Fast, Secure Distribution Across Consumption Points * DevSecOps Securing your Software Supply Chain end-to-end * JFrog Curation Seamlessly Curate Software Packages and ML Models * JFrog Security Essentials (Xray) Integrated SCA for Software Artifacts and ML Models * JFrog Advanced Security Software Supply Chain Security exposure Scanning & Real-world Impact Analysis * IoT Device Management * JFrog Connect IoT Device Management with DevOps Agility * Solutions * Use Case * Cloud Solutions * Hybrid Cloud Adoption * MLSecOps * Secure AI/ML Model Management * DevOps * Artifact Management * Tool Consolidation * CI/CD * DevSecOps * Code Scanning (SAST) * Open Source Software Managing Vulnerabilities * Software Composition Analysis * Secrets Detection * Container/Infra as a Security * Holistic E2E Software Supply Chain Security * Device/IoT * Connected Device Management * Industry * Financial Services * Automotive Industry * Healthcare Services * Technology & Software * Gaming * Government * * Pricing * Developers * * Community * Documentation * Integrations * Applications * * Resources * Learning & Guides * JFrog Help Center * Security Research * JFrog Academy * Events * Webinars & Workshops * DevOps Consulting Services * DevOps Certification * State of Union Report * What are DevOps Tools? * Collateral * Resource Center * JFrog Blog * Customer Stories * Customer Zone * Support Customer support, tickets and community * Manage & Troubleshoot Renew, retrieve licenses, legal and more * MyJFrog Cloud customer portal * Cloud Status Service status & event subscription * JFrog Trust How we protect you & your data * * Partners * * Become a JFrog Partner * Find a JFrog Partner * Get Help * Blog Home CVE-2024-3094 XZ BACKDOOR: ALL YOU NEED TO KNOW By Shachar Menashe, Senior Director Security Research Jonathan Sar Shalom, Director of Threat Research Brian Moussalli, Malware Research Team Leader March 31, 2024 12 min read SHARE: On March 29th, it was reported that malicious code enabling unauthorized remote SSH access has been detected within XZ Utils, a widely used package present in major Linux distributions (The GitHub project originally hosted here is now suspended). Fortunately, the malicious code was discovered quickly by the OSS community and managed to infect only two of the most recent versions of the package, 5.6.0 and 5.6.1, which were released within the past month. Stable versions of most Linux distributions were not affected. The sophisticated malicious payload that came with the affected versions of XZ Utils ran in the same process as the OpenSSH server (SSHD) and modified decryption routines in the OpenSSH server in order to allow specific remote attackers (that own a specific private key) to send arbitrary payloads through SSH which will be executed before the authentication step, effectively hijacking the entire victim machine. This supply chain attack came as a shock to the OSS community, as XZ Utils was considered a trusted and scrutinized project. The attacker built up a credible reputation as an OSS developer over the span of multiple years and used highly obfuscated code in order to evade detection by code reviews. Following our initial research communication, this post will detail its fundamentals and impact. * Who is affected by CVE-2024-3094? * How to detect CVE-2024-3094 * How to remediate CVE-2024-3094 * JFrog OSS tools for detection of CVE-2024-3094 * CVE-2024-3094 technical analysis * Is the JFrog Platform affected by CVE-2024-3094? * Is Conan affected by CVE-2024-3094? * Detecting and resolving CVE-2024-3094 with JFrog Xray WHO IS AFFECTED BY CVE-2024-3094? The following distributions were affected by the attack – Distribution Affected Branches Affected Packages Remediation Comments Fedora 40, 41, Rawhide (active development) xz-5.6.0-* xz-5.6.1-* Fedora 40 – Update to latest version (5.4.x). Fedora 41 & Rawhide – Stop using immediately. Debian testing, unstable (sid), experimental xz-utils 5.5.1alpha-0.1 (uploaded on 2024-02-01), up to and including 5.6.1-1 Update to latest version (5.6.1+really5.4.5-1) No stable branches are affected Alpine Edge (active development) xz 5.6.1-r0, 5.6.1-r1 Update to latest version (5.6.1-r2) No stable branches are affected Kali N/A xz-utils 5.6.0-0.2 (Kali installations updated between March 26th to March 29th) Update to latest version (5.6.1+really5.4.5-1) OpenSUSE Tumbleweed xz-5.6.0, xz-5.6.1 Update to latest version (5.6.1.revertto5.4) Arch Linux N/A xz 5.6.0-1 Update to latest version (5.6.1-2) The following distributions were not affected – Distribution Affected Branches Affected Packages Remediation Comments Red Hat Enterprise Linux N/A N/A N/A No versions of Red Hat Enterprise Linux (RHEL) are affected. Ubuntu N/A N/A N/A The affected version of xz-utils was only in noble-proposed, and was removed before migrating to noble itself. Amazon Linux N/A N/A N/A Wolfi N/A N/A N/A The affected version of liblzma was briefly available (now reverted) but Wolfi’s OpenSSH does not link to liblzma, making it unaffected. Gentoo N/A xz-utils 5.6.0, xz-utils 5.6.1 Update to latest version (restores 5.4.2) Although Gentoo pulled the vulnerable version, it isn’t affected since its OpenSSH isn’t patched to work with systemd-notify, which is a prerequisite for the backdoor. HOW TO DETECT CVE-2024-3094 Check if your version of “xz” is one of the affected versions (5.6.0 or 5.6.1, see table above) by running – strings `which xz` | grep '5\.6\.[01]' Example of a vulnerable output – $ strings `which xz` | grep '5\.6\.[01]' xz (XZ Utils) 5.6.1 Example of a safe output – $ strings `which xz` | grep '5\.6\.[01]' Note that in Alpine Linux (edge branch), the output of xz --version is “5.6.1” even on the fixed version (5.6.1-r2) – It is possible to validate the exact version using the Alpine Package Manager – $ apk list xz xz-5.6.1-r2 x86_64 {xz} ... HOW TO REMEDIATE CVE-2024-3094 Immediately downgrade your version of xz to an earlier version (5.4.6 is the latest unaffected version in most distributions). After downgrading xz, either reboot your machine or restart the OpenSSH server in order to remove the patched code from memory – sudo systemctl restart ssh If upgrading is not possible, another possible workaround is to take advantage of the backdoor’s “kill switch”. Adding the following string to /etc/environment will disable the malicious backdoor functionality (applies after restarting SSH and Systemd) – yolAbejyiejuvnup=Evjtgvsh5okmkAvj JFROG OSS TOOLS FOR DETECTION OF CVE-2024-3094 The JFrog Research team published an open-source detector for CVE-2024-3094. The tool checks whether the local machine is both vulnerable to CVE-2024-3094 (SSH payload is able to run) and currently affected by CVE-2024-3094 (malicious version of XZ is currently installed). CVE-2024-3094 TECHNICAL ANALYSIS WHAT IS THE MALICIOUS PAYLOAD OF CVE-2024-3094? TL;DR – the end goal of the malicious backdoor introduced by CVE-2024-3094, is to inject code to the OpenSSH server (SSHD) that runs on the victim machine, and allow specific remote attackers (that own a specific private key) to send arbitrary payloads through SSH which will be executed before the authentication step, effectively hijacking the entire victim machine. The backdoor payload is still under analysis, but based on preliminary analysis it seems that the payload is highly sophisticated – 1. The payload gets injected into OpenSSH server (sshd process), since liblzma (that contains the malicious code) is a dependency of certain builds of OpenSSH. 2. The payload hooks the RSA_public_decrypt function, a function originally used for validating RSA signatures. 3. The malicious hook code examines the RSA public modulus (“N” value) passed inside the RSA struct (4th argument of RSA_public_decrypt). Note that this modulus is completely controlled by the connecting SSH client (in our case, the attackers). 4. The malicious hook code decrypts the “N” value with a hardcoded decryption key (using the ChaCha20 symmetric stream cipher). 5. The decrypted data is checked for validity by using the Ed448 elliptic curve signing algorithm. Note that since this is an asymmetric signing algorithm, the backdoor contains only the public (verification) key, ensuring that only the attackers can generate valid payloads for the backdoor. Furthermore, the signature is bound to the host’s public key, meaning that a valid signature for one host cannot be reused on a different host. 6. If the data is valid, the payload is executed as a shell command by passing it to system() 7. If the data is invalid in any way (malformed payload, invalid signature), the original implementation of RSA_public_decrypt is resumed in a transparent manner. This means the detection of vulnerable machines over the network may be impossible for anyone besides the attackers. The sophisticated nature of this attack and the use of highly future proof crypto algorithms (Ed448 vs the more standard Ed25519) led many to believe that the attack may be a nation-state level cyberattack. Researchers have published a modified SSH client that allows inputting an arbitrary RSA public key, in order to further examine the malware. TIMELINE OF THE ATTACK The most notable part of this supply chain attack is the extreme levels of dedication of the attacker, working more than two years to establish themselves as a legitimate maintainer, offering to pick up work in various OSS projects and committing code across multiple projects in order to avoid detection. 2021 – GitHub user Jia Tan (JiaT75) account created. Started contributing to several projects with 546 commits done in 2021, of which the most suspicious one was made to libarchive. A more detailed account of this commit can be found below. 2022, February 6th – JiaT75 submits a first (legitimate) commit to the XZ repo. The commit adds arguments validation to the LZMA and LZMA2 encoders. Add Parameter Validation to LZMA and LZMA2 encoders 2023, June 27-28th – A series of changes were made to XZ Utils, possibly setting the ground for the attack. In these changes, support for ifunc implementation to crc64_fast.c, was added. Introducing the ifunc implementation to XZ Utils Interestingly, this patch was introduced by the original maintainer of the package, Lasse Collin, who credited another contributor for this patch, Hans Jansen. This ifunc implementation is possibly one of the ways which the backdoor seems to operate, according to the analysis by Andres Freund. 2023, July 8th – JiaT75 opens a Pull Request in oss-fuzz, a project that performs fuzz testing on XZ and many other OSS projects. The PR disables ifunc fuzzing, which effectively prevents oss-fuzz from finding the malicious changes done in XZ. 2024, February 15th – JiaT75 adds an ignore rule for build-to-host.m4 in the XZ repository, via its .gitignore file. This script file, soon to be included in actual release bundles, is executed during the package’s build, and contains the malicious M4 macros which initializes the backdoor’s installation on the victim’s machine. 2024, February 23rd – JiaT75 adds the obfuscated binary backdoor in two tests files in the XZ repository – * tests/files/bad-3-corrupt_lzma2.xz * tests/files/good-large_compressed.lzma 2024, February 24th – JiaT75 releases version 5.6.0 with the malicious build-to-host.m4. At this stage, the malicious payload is fully operational (any subsequent XZ version is compromised). Malicious xz-utils version 5.6.0 pulled by Debian, Gentoo and Arch Linux. 2024, February 27th – Malicious xz-utils version 5.6.0 pulled by Fedora. 2024, March 5th – Malicious xz-utils version 5.6.0 pulled by openSUSE. 2024, March 9th – JiaT75 updates the backdoor’s binaries to an improved version, and releases version 5.6.1. Malicious xz-utils version 5.6.1 pulled by Fedora, Gentoo and Arch Linux 2024, March 10th – Malicious xz-utils version 5.6.1 pulled by openSUSE. 2024, March 11th – Malicious xz-utils version 5.6.1 pulled by Alpine. 2024, March 26th – Malicious xz-utils version 5.6.1 pulled by Debian. 2024, March 29th – A detailed account of the malicious activity found in XZ utils was published on the oss-security mailing list by Andres Freund. 2024, March 30th – Lasse Collins, xz-utils original maintainer, made an official announcement regarding the project’s breach. WAS ONLY XZ AFFECTED BY THE MALICIOUS ACTOR? While the malicious code was detected only on the XZ project, other code contributions of the attacker’s account are currently being investigated. As for today, some notable suspicious code was added to the following projects: libarchive: In 2021, JiaT75 submitted a pull request to the libarchive repository with the title ‘Added error text to warning when untaring with bsdtar’ which seemed legitimate at first glance. However, upon closer inspection, it was discovered that the code in this pull request replaced the safe function safe_fprintf() with the unsafe version fprintf(), potentially introducing a character escape vulnerability. The security implications of this change are currently being investigated, as they are not yet clear. However, since a malicious actor is involved in this code modification, it is reasonable to assume that more sophisticated attacks might be at play in this investigation. A PoC for characters escape was already published: PoC by mikesiegel A fix to this vulnerability was introduced to libarchive main branch but has not yet been released as a version update at the time of writing. oss-fuzz: In early 2023, JiaT75 changed the primary email address of the XZ project in Google’s oss-fuzz tool to his own personal Gmail address. This suggests that they may have wanted reports of vulnerabilities found in Project XZ to be reported to them first so that they would know when their malicious actions are discovered – Later in 2023, they opened another PR to disable `Indirect function support` in the fuzzer’s configuration for the XZ project. This looks like preparation for the backdoor they were going to add later to the XZ project to prevent detection by the fuzzer – Currently, both the fuzzers for XZ and liblzma were disabled by the oss-fuzz maintainers. IS THE JFROG PLATFORM AFFECTED BY CVE-2024-3094? JFrog is not affected by CVE-2024-3094 as none of its products use the vulnerable xz_utils versions. IS CONAN AFFECTED BY CVE-2024-3094? As of March 30th, recipes containing the vulnerable xz_utils versions have been removed from Conan Center. In addition, recipes that depended on the affected versions of xz_utils (cpython and libunwind) have been reverted to require the latest safe version of xz_utils. DETECTING AND RESOLVING CVE-2024-3094 WITH JFROG XRAY JFrog Security Essentials (Xray) can be used to identify every vulnerable occurrence across your entire codebase and compiled artifacts, including Docker containers, repository packages, and even standalone binaries. JFrog Xray can be used to scan source code and binary artifacts in order to detect the affected libraries – -------------------------------------------------------------------------------- SCHEDULE A DEMO OF JFROG SECURITY SOLUTIONS! BOOK A DEMO -------------------------------------------------------------------------------- STAY UP-TO-DATE WITH JFROG SECURITY RESEARCH The security research team’s findings and research play an important role in improving the JFrog Software Supply Chain Platform’s application software security capabilities. Follow the latest discoveries and technical updates from the JFrog Security Research team on our research website, and on X @JFrogSecurity. Tags: xz-backdoor security-research Start a Trial SHARE: Sign up for blog updates I have read and agreed to the Privacy Policy Subscribe POPULAR TAGS * CI/CD * Artifactory * Best Practices * DevOps * Xray TRY THE JFROG PLATFORM IN THE CLOUD OR SELF-HOSTED Start Free or Book a Demo THANK YOU! Full Name* Email* I have read and agree to the Privacy Policy Proceed Products * Artifactory * Xray * Curation * Pipelines * Distribution * Container Registry * Connect * JFrog Platform * Start Free Resources * Blog * Security Research * Events * Integrations * JFrog Help Center * DevOps Tools * Open Source * Featured * JFrog Trust * Compare JFrog Company * About * Management * Investor Relations * Partners * Customers * Careers * Press * Contact Us * Brand Guidelines Developer * Community * Downloads * Community Events * Open Source Foundations * Community Forum * Superfrogs * Applications Follow Us © 2024 JFrog Ltd All Rights Reserved Discover More * Artifact Repository * Fast and Trusted Software Distribution * Software Supply Chain Platform Pricing Terms of Use | Privacy Policy | Cookies Policy | Cookies Settings | Accessibility Notice | Accessibility Mode SUCCESS Your action was successful Get Started x OOPS... SOMETHING WENT WRONG Please try again later Continue INFORMATION Modal Message Continue Click Here 请点这里