ID 5267EC1C-D204-40D2-BD4F-6C2DD495EE18
Type huntr
Reporter 0xamal
Modified 2021-10-01T09:06:12
Description
```
Description
file upload vulnerability in application
Proof of Concept
step to reproduce
1)login to application
2) goto https://demo.firefly-iii.org/create-from-bill/1
3) upload file any kind of file application accept
Reference PoC
1) https://i.ibb.co/9wWRnsf/Screenshot-12.png
2)https://i.ibb.co/68NRd4m/Screenshot-13.png
while creating new bill user is able to upload any kind of malicious file which will allows attacker to run remote code to compromise
appliation.
code
<input multiple="multiple" helptext="Maximum file size: 64 MB" class="form-control" id="ffInput_attachments" autocomplete="off" placeholder="Attachments" name="attachments[]" type="file">
Solution : define file type validation in client side of the application to validate the file extension
```
{"id": "5267EC1C-D204-40D2-BD4F-6C2DD495EE18", "vendorId": null, "type": "huntr", "bulletinFamily": "bugbounty", "title": " in firefly-iii/firefly-iii", "description": "```\nDescription\nfile upload vulnerability in application\n\nProof of Concept\nstep to reproduce\n1)login to application\n2) goto https://demo.firefly-iii.org/create-from-bill/1\n3) upload file any kind of file application accept\nReference PoC\n1) https://i.ibb.co/9wWRnsf/Screenshot-12.png\n2)https://i.ibb.co/68NRd4m/Screenshot-13.png\n\nwhile creating new bill user is able to upload any kind of malicious file which will allows attacker to run remote code to compromise \nappliation.\n\ncode \n\n<input multiple=\"multiple\" helptext=\"Maximum file size: 64 MB\" class=\"form-control\" id=\"ffInput_attachments\" autocomplete=\"off\" placeholder=\"Attachments\" name=\"attachments[]\" type=\"file\">\n\nSolution : define file type validation in client side of the application to validate the file extension\n```", "published": "2021-10-01T08:43:15", "modified": "2021-10-01T09:06:12", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}, "cvss2": {"cvssV2": {"version": "2.0", "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "accessVector": "NETWORK", "accessComplexity": "LOW", "authentication": "SINGLE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "baseScore": 6.5}, "severity": "MEDIUM", "exploitabilityScore": 8.0, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}, "cvss3": {"cvssV3": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}, "href": "https://www.huntr.dev/bounties/5267ec1c-d204-40d2-bd4f-6c2dd495ee18/", "reporter": "0xamal", "references": ["https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload"], "cvelist": ["CVE-2021-3846"], "immutableFields": [], "lastseen": "2022-03-30T11:11:02", "viewCount": 1, "enchantments": {"vulnersScore": "PENDING"}, "_state": {}, "_internal": {}, "status": "valid", "cwe_id": "434", "repository": "https://github.com/firefly-iii/firefly-iii", "language": "PHP", "patch_commit_sha": "a85b6420c19ace35134f896e094e1971d8c7954b"}
{"cve": [{"lastseen": "2022-03-23T18:59:41", "description": "firefly-iii is vulnerable to Unrestricted Upload of File with Dangerous Type", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-10-19T13:15:00", "type": "cve", "title": "CVE-2021-3846", "cwe": ["CWE-434"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2021-3846"], "modified": "2021-10-22T00:00:00", "cpe": [], "id": "CVE-2021-3846", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3846", "cvss": {"score": 6.5, "vector": "AV:N/AC:L/Au:S/C:P/I:P/A:P"}, "cpe23": []}]}