Code execution via tokenless state-changing API requests
Published Nov 16, 2023 · Updated Aug 2, 2024
CSRF in the self-hosted Prefect API before 2.16.5 allows remote attackers to alter block documents through a victim's browser. The API accepts state-changing POST requests without a per-client CSRF token, allowing forged requests to replace a LocalProcess block's command. A victim must visit attacker-controlled content while the unauthenticated API is browser-reachable; a later block run executes the substituted command and can expose secrets or run code.
Summary
What happened
CSRF in the self-hosted Prefect API before 2.16.5 allows remote attackers to alter block documents through a victim's browser. The API accepts state-changing POST requests without a per-client CSRF token, allowing forged requests to replace a LocalProcess block's command. A victim must visit attacker-controlled content while the unauthenticated API is browser-reachable; a later block run executes the substituted command and can expose secrets or run code.
The record
- CVE
- CVE-2023-6022
- Published
- Nov 16, 2023
- Updated
- Aug 2, 2024
- Vendor
- Prefect Technologies, Inc.
- Product
- Prefect
- Classifications
- CWE-352, T1189
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Nov 16, 2023CVE publishedPublication date reported by the CVE source.
- Aug 2, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <2.16.5
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- Prefect CSRF block-command reproduction descriptionproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo