← 返回首页
Use of file upload — CodeQL query help documentation CodeQL docs
CodeQL documentation
CodeQL resources

Use of file upload

ID: cs/web/file-upload Kind: problem Security severity: 9.8 Severity: recommendation Precision: high Tags: - security - maintainability - frameworks/asp.net - external/cwe/cwe-434 Query suites: - csharp-security-extended.qls - csharp-security-and-quality.qls

Click to see the query in the CodeQL repository

Allowing end users to upload files may lead to severe security threats. Attackers may use this open door to compromise your application, either by overwriting data or by injecting malicious code to run on your server.

Recommendation

Whist it might not be possible to remove the ability to upload files, special care should be taken to ensure files are handled in a secure manner. The following checks should be implemented to ensure the security of your application:

References