CVE-2026-2979
Unrestricted File Upload in FastApiAdmin Scheduled Task API
Publication date: 2026-02-23
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| fastapiadmin | fastapiadmin | to 2.2.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-434 | The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. |
| CWE-284 | The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': 'CVE-2026-2979 is an unrestricted file upload vulnerability in FastApiAdmin versions up to 2.2.0, specifically in the user_avatar_upload_controller function. Authenticated users can exploit this flaw by uploading arbitrary files to the server because the upload mechanism only relies on the Content-Type header to determine allowed file extensions, without properly validating or normalizing file paths.'}, {'type': 'paragraph', 'content': "This allows attackers to bypass extension checks, for example by disguising a Python script as an SVG file. When combined with FastApiAdmin's scheduled task APIs, this can lead to remote code execution by persisting and triggering the malicious file."}, {'type': 'paragraph', 'content': 'The vulnerability arises from improper input handling and lack of server-side content inspection, making it possible to upload dangerous files that the system may automatically process.'}] [1, 3]
How can this vulnerability impact me? :
This vulnerability can impact you by allowing an attacker to upload and execute arbitrary files on your server, potentially leading to remote code execution.
Such an attack can compromise the confidentiality, integrity, and availability of your system by enabling unauthorized access, data manipulation, or service disruption.
Because the exploit can be launched remotely and does not require elevated privileges beyond authentication, it poses a significant security risk.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring for attempts to upload files to the endpoint `/api/v1/system/user/current/avatar/upload` in FastApiAdmin versions up to 2.2.0.'}, {'type': 'paragraph', 'content': 'Since the vulnerability involves unrestricted file uploads that bypass content-type checks, detection can include inspecting HTTP requests for suspicious file uploads, especially those with mismatched file extensions or unusual content types.'}, {'type': 'paragraph', 'content': 'Commands to detect exploitation attempts might include network traffic inspection using tools like tcpdump or Wireshark to filter HTTP POST requests to the vulnerable endpoint.'}, {'type': 'list_item', 'content': "tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' | grep '/api/v1/system/user/current/avatar/upload'"}, {'type': 'list_item', 'content': 'Use web server logs to search for POST requests to `/api/v1/system/user/current/avatar/upload` with suspicious file names or extensions.'}, {'type': 'list_item', 'content': 'Scan the upload directory for unexpected or executable files, such as Python scripts disguised as images.'}] [1]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include enforcing server-side validation of uploaded files rather than relying on the Content-Type header.
- Validate file magic bytes to confirm the actual file type.
- Derive file extensions from the actual content instead of trusting the Content-Type header.
- Normalize and restrict file paths to a safe upload directory with no execute permissions.
- Generate safe, randomized filenames to prevent predictable file placement.
- Implement strict allowlists for permitted upload types.
- Scan uploaded files for dangerous content.
- Apply least-privilege access controls and audit logging for both upload and scheduled task APIs to monitor and limit potential abuse.