Malicious code in selfccreplacever (PyPI)
Summary
MAL-2023-5963: Malicious code in selfccreplacever (PyPI). Affected versions are not published. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The selfccreplacever package is an open-source Python package available on PyPI. It is designed to replace occurrences of a specified substring in a given string with another substring. The package is commonly used in various Python applications for string manipulation tasks. However, a recent security analysis by Checkmarx has identified a malicious code injection in the selfccreplacever package.
Vulnerability Detail
The malicious code injection in selfccreplacever poses a significant security risk to applications that utilize this package. The code injection was introduced in version 0 of the package and has been identified as part of a larger campaign by the EsqueleSquad group. The injected code executes spyware and information-stealing malware, potentially compromising sensitive data within the affected applications. The malicious code can be triggered when using the selfccreplacever package to replace substrings in strings.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall selfccreplacever
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, it is advised to cease using the selfccreplacever package until a secure version is available. Developers can consider alternative string manipulation methods or packages that are not affected by this vulnerability. Here is an example of using the built-in replace function in Python as an alternative:
string = 'example string'
new_string = string.replace('old', 'new')
Conclusion
The malicious code injection in the selfccreplacever package poses a significant security risk to applications utilizing this package. It is crucial to update to a secure version of the package and regularly update all dependencies to mitigate the risk of similar vulnerabilities. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for selfccreplacever →
FAQ
All versions of selfccreplacever up to and including version 0 are affected by this vulnerability.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for any open-source vulnerabilities, including this one.
The malicious code injection in selfccreplacever can lead to the execution of spyware and information-stealing malware within affected applications. This can result in the compromise of sensitive data, unauthorized access, and potential harm to users or organizations.
No, the selfccreplacever package has not been removed from PyPI. However, it is strongly recommended to update to a secure version that does not contain the malicious code.
If you have any additional questions or need further assistance regarding this vulnerability, you can contact the Checkmarx supply chain security team at supplychainsecurity@checkmarx.com or visit their website at https://bit.ly/checkmarx-malicious-packages.