luyadev/yii-helpers: Improper Neutralization of Formula Elements in a CSV File
CVE-2022-1544 is a high-severity improper neutralization of formula elements in a CSV file vulnerability in luyadev/yii-helpers from Luyadev, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 1.2.1 as the first without the flaw, so updating luyadev/yii-helpers to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 2.38% chance of exploitation within 30 days, higher than 84% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update luyadev/yii-helpers to 1.2.1 or a later version.
- Update Yii-helpers to 1.2.1 or a later version.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Luyadev | luyadev/yii-helpers | before 1.2.1 | 1.2.1 |
| Luya | Yii-helpers | before 1.2.1 | 1.2.1 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.0 | 8.0 | High | CNA (huntr.dev) |
| CVSS 2.0 | 6.8 | Medium | NVD |
Official description
Formula Injection/CSV Injection due to Improper Neutralization of Formula Elements in CSV File in GitHub repository luyadev/yii-helpers prior to 1.2.1. Successful exploitation can lead to impacts such as client-sided command injection, code execution, or remote ex-filtration of contained confidential data.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Formula Elements in a CSV File
The product saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by a spreadsheet product.
How developers prevent this class of flaw
- When generating CSV output, ensure that formula-sensitive metacharacters are effectively escaped or removed from all data before storage in the resultant CSV. Risky characters include '=' (equal), '+' (plus), '-' (minus), and '@' (at).
- If a field starts with a formula character, prepend it with a ' (single apostrophe), which prevents Excel from executing the formula.
- Certain implementations of spreadsheet software might disallow formulas from executing if the file is untrusted, or if the file is not authored by the current user.
More Improper Neutralization of Formula Elements in a CSV File vulnerabilities (CWE-1236)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/luyadev/yii-helpers/commit/9956ed63f516110c2b588471507b870e748c4cfbThird Party Advisory
- huntr.dev/bounties/fa6d6e75-bc7a-40f6-9bdd-2541318912d4Exploit, Third Party Advisory
Recent Improper Neutralization of Formula Elements in a CSV File vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.