Skip to content
File upload Write-up Intermediate

SageCRM - SQL Injection, Arbitrary File Upload

The Component Manager in SageCRM allows an authenticated user to upload a zip file containing an empty .ecf file, which is then extracted to a directory outside the webroot without validation. An attacker could use this to place arbitrary files on the target filesystem.

research.aurainfosec.io

Published on research.aurainfosec.io

Release notes for the version containing appropriate fixes are located at SageCRM’s community site.

The author, on research.aurainfosec.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Component Manager does not validate the contents of the uploaded zip file or the .ecf component file, allowing arbitrary files to be extracted to a directory outside the webroot.

Impact

An authenticated attacker could upload and extract arbitrary files onto the target filesystem, potentially leading to further compromise.

What the attacker needed

Authenticated user account

The fix

The vulnerability was fixed in version 7.3 SP3.

How it was found

  1. Create a zip file containing an empty .ecf file and any other file to be extracted.
  2. Upload the zip file through the Component Manager functionality.
  3. The zip file is extracted to the inf directory outside the webroot.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SageCRM has a feature that lets users add extra components by uploading a zip file. The application does not check what is inside the zip file properly, so someone with a login can upload a zip that contains any file and have it unpacked onto the server. This means they can put files on the server that they should not be able to.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.