Skip to main content

CVE-2022-36065: CWE-24: Path Traversal: '../filedir' in growthbook growthbook

Medium
Published: Tue Sep 06 2022 (09/06/2022, 21:05:10 UTC)
Source: CVE
Vendor/Project: growthbook
Product: growthbook

Description

GrowthBook is an open-source platform for feature flagging and A/B testing. With some self-hosted configurations in versions prior to 2022-08-29, attackers can register new accounts and upload files to arbitrary directories within the container. If the attacker uploads a Python script to the right location, they can execute arbitrary code within the container. To be affected, ALL of the following must be true: Self-hosted deployment (GrowthBook Cloud is unaffected); using local file uploads (as opposed to S3 or Google Cloud Storage); NODE_ENV set to a non-production value and JWT_SECRET set to an easily guessable string like `dev`. This issue is patched in commit 1a5edff8786d141161bf880c2fd9ccbe2850a264 (2022-08-29). As a workaround, set `JWT_SECRET` environment variable to a long random string. This will stop arbitrary file uploads, but the only way to stop attackers from registering accounts is by updating to the latest build.

AI-Powered Analysis

AILast updated: 06/22/2025, 22:35:07 UTC

Technical Analysis

CVE-2022-36065 is a medium-severity path traversal vulnerability affecting GrowthBook, an open-source platform used for feature flagging and A/B testing. The vulnerability exists in self-hosted GrowthBook deployments prior to the 2022-08-29 patch. It arises when the application is configured to allow local file uploads (instead of cloud storage options like S3 or Google Cloud Storage), and the environment variables NODE_ENV is set to a non-production value, and JWT_SECRET is set to a weak or guessable string such as 'dev'. Under these conditions, an attacker can register a new account and exploit the path traversal flaw to upload files to arbitrary directories within the container hosting GrowthBook. By uploading a malicious Python script to a suitable location, the attacker can achieve arbitrary code execution within the container environment. This can lead to full compromise of the containerized application instance. The vulnerability is rooted in improper limitation of pathname to restricted directories (CWE-22) and path traversal (CWE-24). The issue was patched in the commit dated 2022-08-29, which restricts file upload paths and improves authentication controls. As a temporary mitigation, setting JWT_SECRET to a strong, random string can prevent arbitrary file uploads, but it does not prevent attackers from registering new accounts, so updating to the latest patched version is strongly recommended. There are no known exploits in the wild as of the publication date, but the conditions for exploitation require a combination of misconfigurations and vulnerable versions, which could be present in some self-hosted GrowthBook deployments.

Potential Impact

For European organizations using self-hosted GrowthBook instances with vulnerable versions and configurations, this vulnerability poses a significant risk. Successful exploitation can lead to arbitrary code execution within the container, potentially allowing attackers to escalate privileges, move laterally within internal networks, exfiltrate sensitive data, or disrupt services. Since GrowthBook is often used to manage feature flags and A/B testing, compromise could also lead to manipulation of application behavior, impacting business logic and user experience. The impact on confidentiality, integrity, and availability depends on the deployment context but could be severe if the container has access to sensitive data or internal systems. Given that the vulnerability requires self-hosted deployments with specific insecure configurations, cloud-hosted GrowthBook users are not affected. However, organizations that have not hardened environment variables or use local file uploads remain at risk. The medium severity rating reflects the need for multiple conditions for exploitation, but the potential for arbitrary code execution elevates the threat level. European organizations in sectors with high reliance on software development and feature management platforms, such as technology firms, financial services, and e-commerce, could be particularly impacted.

Mitigation Recommendations

1. Immediate update: Organizations should upgrade all self-hosted GrowthBook instances to the patched version released on or after 2022-08-29 to fully remediate the vulnerability. 2. Environment hardening: Ensure NODE_ENV is set to 'production' to disable development-specific behaviors that facilitate exploitation. 3. Secure JWT_SECRET: Replace any weak or default JWT_SECRET values with long, cryptographically strong random strings to prevent unauthorized file uploads. 4. Storage configuration: Prefer cloud storage options (e.g., S3, Google Cloud Storage) for file uploads instead of local file storage to reduce attack surface. 5. Account registration controls: Implement additional controls on user registration, such as CAPTCHA, email verification, or IP rate limiting, to prevent automated or malicious account creation. 6. Container isolation: Run GrowthBook containers with least privilege, restricting filesystem and network access to limit the impact of potential code execution. 7. Monitoring and logging: Enable detailed logging and monitor for suspicious file upload activity or unauthorized account registrations to detect exploitation attempts early. 8. Incident response planning: Prepare to respond to potential compromises by having backups, forensic capabilities, and remediation procedures in place.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf3d86

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/22/2025, 10:35:07 PM

Last updated: 8/8/2025, 11:32:11 PM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats