Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser Extension Top 10 Security Vulnerabilities #1517

Merged
merged 11 commits into from
Nov 18, 2024

Conversation

paragbagul111
Copy link
Contributor

@paragbagul111 paragbagul111 commented Oct 18, 2024

Browser Extension Security Vulnerabilities

This document outlines common security vulnerabilities found in browser extensions and provides examples of how attackers can exploit these vulnerabilities.

1. Permissions Overreach

An extension with broad permissions can access all tabs and browsing data. If the extension is compromised, an attacker can capture sensitive information from any website the user visits, including passwords and personal data.

2. Data Leakage

An extension sending the URLs of all visited pages to a remote server can inadvertently leak sensitive information, especially if users visit banking or personal sites.

3. User Input Sanitization

User inputs can execute scripts in the page's context. An attacker could inject scripts that steal cookies, session tokens, or sensitive data.

4. Insecure Fetch Call

Data sent over insecure HTTP can be intercepted by attackers on the same network, allowing them to capture sensitive information, such as tokens or personal data.

5. Code Injection

If an attacker controls the script URL, they can inject malicious code into the page, leading to data theft or manipulation of the page’s functionality.

6. Malicious Updates

If the update mechanism is compromised, attackers can push malicious code to users without their knowledge, potentially gaining control over their browsers.

7. Third-Party Dependencies

An extension relying on outdated third-party libraries may become vulnerable if those libraries have known security flaws that attackers can exploit.

8. Lack of Content Security Policy (CSP)

Without a strong CSP, attackers can inject untrusted content, increasing the risk of XSS and other attacks that manipulate the extension’s behavior.

9. Insecure Storage of Sensitive Data

Vulnerable Code Example:

If an attacker gains access to the local storage, they can easily retrieve sensitive information, such as tokens or user credentials, leading to unauthorized access.

10. Insufficient Privacy Controls

Users may be unaware of how their data is being collected or used, leading to potential abuse of their information without consent or awareness.

Add OWASP Browser Extension Vulnerabilities Cheat Sheet
Create BrowserExtensionVulnerabilities.md
@jmanico
Copy link
Member

jmanico commented Oct 18, 2024

This is very nice work

jmanico
jmanico previously approved these changes Oct 18, 2024
@mackowski
Copy link
Collaborator

@paragbagul111 content looks good, can you please fix the linter errors

@paragbagul111
Copy link
Contributor Author

Hi All

I have fixed the linter error. Please take a moment to review the changes I made.

Thank you

@paragbagul111
Copy link
Contributor Author

I have updated the numbering for the vulnerabilities as suggested. Specifically, I changed the second '## 4. Code Injection' to '## 5. Code Injection' and adjusted the subsequent numbers accordingly. The changes have been implemented as requested.

@paragbagul111
Copy link
Contributor Author

I have made some changes to resolve issues in the

BrowserExtensionVulnerabilities.md

Can You check again

@paragbagul111
Copy link
Contributor Author

paragbagul111 commented Oct 26, 2024

Hi @jmanico @mackowski

I have fixed the linting errors in the code. Could you please review and merge the pull request at your convenience?

Thank you!

jmanico
jmanico previously approved these changes Oct 26, 2024
Removed comments that could potentially break JSON code
mackowski
mackowski previously approved these changes Oct 31, 2024
Copy link
Collaborator

@mackowski mackowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mackowski
Copy link
Collaborator

@paragbagul111 we are still waiting for you to fix linter errors ;-)

@paragbagul111
Copy link
Contributor Author

I’m working on fixing some linting issues in the code, but I’m running into trouble because of certain code snippets. Would it be okay if I temporarily removed them to resolve the issues?

@jmanico
Copy link
Member

jmanico commented Nov 15, 2024

Yes sounds good!

@paragbagul111
Copy link
Contributor Author

The changes are done. Let me know if you need anything else.

jmanico
jmanico previously approved these changes Nov 15, 2024
Changes Completed - Vulnerable Code Snippets Removed
@paragbagul111 paragbagul111 dismissed stale reviews from jmanico and mackowski via f3580ae November 15, 2024 15:43
@jmanico
Copy link
Member

jmanico commented Nov 15, 2024

Can you take a look at these?

cheatsheets/BrowserExtensionVulnerabilities.md:1 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "# Browser Extension Security Vulnerabilities"]
cheatsheets/BrowserExtensionVulnerabilities.md:3 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 1. Permissions Overreach"]
cheatsheets/BrowserExtensionVulnerabilities.md:5 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 2. Data Leakage"]
cheatsheets/BrowserExtensionVulnerabilities.md:7 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 3. Cross-Site Scripting (XSS)"]
cheatsheets/BrowserExtensionVulnerabilities.md:9 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 4. Insecure Communication"]
cheatsheets/BrowserExtensionVulnerabilities.md:11 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 5. Code Injection"]
cheatsheets/BrowserExtensionVulnerabilities.md:13 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 6. Malicious Updates"]
cheatsheets/BrowserExtensionVulnerabilities.md:15 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 7. Third-Party Dependencies"]
cheatsheets/BrowserExtensionVulnerabilities.md:17 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 8. Lack of Content Security Policy (CSP)"]
cheatsheets/BrowserExtensionVulnerabilities.md:19 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 9. Insecure Storage"]
cheatsheets/BrowserExtensionVulnerabilities.md:21 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## 10. Insufficient Privacy Controls"]

@paragbagul111
Copy link
Contributor Author

Yes, let me fix it. I’ll share the updated version with you once it's ready.

Key Changes:

Added one blank line before each heading (##).
Added one blank line after each heading.
Copy link
Member

@jmanico jmanico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the lints!

@mackowski
Copy link
Collaborator

I would only change the name of the file to Browser_Extension_Vulnerabilities_Cheat_Sheet.md and it is ready to be merged IMO

@paragbagul111
Copy link
Contributor Author

Hi @jmanico and @mackowski

Could you please let me know when it will be published?

Thank you

@mackowski mackowski merged commit 6dd697d into OWASP:master Nov 18, 2024
3 checks passed
@mackowski
Copy link
Collaborator

@paragbagul111 is is already https://cheatsheetseries.owasp.org/cheatsheets/BrowserExtensionVulnerabilities.html but the link will change after we update the name of the file in this PR #1544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants