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

Dangerous JS Functio eval() - PCI DSS ASV Scan issue #536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luckyduck
Copy link

Replace potentially dangerous eval() call. Severity rating medium (CVSS Score 4.5). Creates issues with PCI DSS ASV scans.

Replace potentially dangerous eval() call. Severity rating medium (CVSS Score 4.5). Creates issues with PCI DSS ASV scans.
@luckyduck
Copy link
Author

luckyduck commented Mar 3, 2025

Attack Vector Explanation:

The use of eval() directly executes JavaScript code from strings constructed with user-provided input. An attacker who controls or manipulates the value of me.opts.moptPayoneParamsLanguage can inject malicious JavaScript code, causing Cross-site scripting (XSS).

Example Attack: If an attacker sets:

me.opts.moptPayoneParamsLanguage = "en; alert(document.cookie);"

Then the original code:

//eval('Payone.ClientApi.Language.' + me.opts.moptPayoneParamsLanguage);

executes as:

Payone.ClientApi.Language.en; alert(document.cookie);

This attack triggers arbitrary JavaScript execution, potentially exposing sensitive data like session cookies, allowing unauthorized actions or account takeover.

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.

1 participant