JavaScript detectors

Showing all detectors for the JavaScript language.

Browse by tags
Browse all detectors by tags.
Browse by severity
Browse all detectors by severity.
Browse by category
Browse all detectors by category.

Browse all detectors

Improper access control

The software does not restrict or incorrectly restrict access to a resource from an unauthorized actor.

Sensitive data stored unencrypted due to partial encryption

Encryption that is dependent on conditional logic, such as an if...then clause, might cause unencrypted sensitive data to be stored.

Pseudorandom number generators

Using pseudorandom number generators (PRNGs) is security-sensitive.

OS command injection

Constructing operating system or shell commands with unsanitized user input can lead to inadvertently running malicious code.

URL redirection to untrusted site

User-controlled input that specifies a link to an external site could lead to phishing attacks and allow user credentials to be stolen.

Untrusted Amazon Machine Images

Improper filtering of Amazon Machine Images (AMIs) can result in loading an untrusted image, which is a potential security vulnerability.

Integer overflow

An integer overflow might cause security issues when it is used for resource management or execution control.

Improper certificate validation

Lack of validation of a security certificate can lead to host impersonation and sensitive data leaks.

Protection mechanism failure

Disabled or incorrectly used protection mechanism can lead to security vulnerabilities.

Non-literal regular expression

Non-literal input to a regular expression might lead to a denial of service attack.

Tainted input for Docker API

Passing an unsanitized user argument to a function call makes your code insecure.

Usage of an API that is not recommended

APIs that are not recommended were found.

XML external entity

Objects that parse or handle XML can lead to XML external entity (XXE) attacks when they are misconfigured.

Insecure CORS policy

Cross-origin resource sharing policies that are too permissive could lead to security vulnerabilities.

Server-side request forgery

Insufficient sanitization of potentially untrusted URLs on the server side can allow server requests to unwanted destinations.

New function detected

Use of new Function() can be dangerous if used to evaluate dynamic content.

Stack trace exposure

Stack traces can be hard to use for debugging.

Deserialization of untrusted object

Deserialization of untrusted objects can lead to security vulnerabilities such as, inadvertently running remote code.

Timing attack

Insecure string comparison can lead to a timing-attack.

SNS don't bind subscribe and publish

Do not bind the SNS Publish operation with the SNS Subscribe or Create Topic operation.

Sensitive information leak

Exposure of sensitive information can lead to an unauthorized actor having access to the information.

Invoke super appropriately

The incorrect use of super() causes problems.

NoSQL injection

User input can be vulnerable to injection attacks.

Check failed records when using kinesis

A batch request that doesn't check for failed records can lead to loss of data.

Hardcoded credentials

Hardcoded credentials can be intercepted by malicious actors.

Insecure cookie

Insecure cookies can lead to unencrypted transmission of sensitive data.

Weak obfuscation of web requests

Weak obfuscation of web requests makes your application vulnerable.

Catch and swallow exception

Swallowing exceptions, without rethrowing or logging them, can make it hard to understand why your application is failing.

Cross-site scripting

Relying on potentially untrusted user inputs when constructing web application outputs can lead to cross-site scripting vulnerabilities.

Logging of sensitive information

The logging of sensitive information can expose the information to potential attackers.

Limit request length

Significant content length can lead to denial of service.

String passed to setInterval or setTimeout

String passed to setInterval or setTimeout can cause the JavaScript engine to evaluate, which can lead to a security risk.

Hardcoded IP address

Hardcoding an IP address can cause security problems.

Log injection

Using untrusted inputs in a log statement can enable attackers to break the log's format, forge log entries, and bypass log monitors.

Override of reserved variable names in a Lambda function

Overriding environment variables that are reserved by AWS Lambda might lead to unexpected behavior.

AWS credentials logged

Logging unencrypted AWS credentials can expose them to an attacker.

XPath injection

Potentially unsanitized user input in XPath queries can allow an attacker to control the query in unwanted or insecure ways.

Improper restriction of rendered UI layers or frames

The application incorrectly restricts frame objects or UI layers that belong to another application or domain.

Insecure cryptography

Weak, broken, or misconfigured cryptography can lead to security vulnerabilities.

Data loss in a batch request

A batch request that doesn't check for failed items can lead to loss of data.

Path traversal

Creating file paths from untrusted input might give a malicious actor access to sensitive files.

Least privilege violation

The elevated privilege level should be dropped immediately after the operation is performed.

DNS prefetching

DNS prefetching can cause latency and privacy issues.

Insecure object attribute modification

Updating object attributes obtained from external sources is security sensitive.

Resource leak

Allocated resources are not released properly.

Insufficiently protected credentials

An object attribute constructed from a user-provided input should not be passed directly to a method.

File extension validation

Checks if the extension of a file uploaded by a user is validated before the file is saved.

Insecure connection using unencrypted protocol

Connections that use insecure protocols transmit data in cleartext, which can leak sensitive information.

Cross-site request forgery

Insecure configuration can lead to a cross-site request forgery (CRSF) vulnerability.

Session fixation

Session fixation might allow an attacker to steal authenticated session IDs.

Typeof expression

The typeof operator should only be compared to valid values.

Set SNS Return Subscription ARN

To always return the subscription ARN, set the ReturnSubscriptionArn argument to True.

File and directory information exposure

Allowing hidden files while serving files from a given root directory can cause information leakage.

Missing Amazon S3 bucket owner condition

Not setting the Amazon S3 bucket owner condition could lead to accidentally using the wrong bucket.

Insecure hashing

Obsolete, broken, or weak hashing algorithms can lead to security vulnerabilities.

Numeric truncation error

Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.

Avoid nan in comparison

Checks if nan is used is comparison.

Client-side KMS reencryption

Client-side decryption followed by encryption is inefficient and can lead to sensitive data leaks.

AWS client not reused in a Lambda function

Recreating AWS clients in each Lambda function invocation is expensive.

Improper input validation

Improper input validation can enable attacks and lead to unwanted behavior.

LDAP injection

LDAP queries that rely on potentially untrusted inputs can allow attackers to read or modify sensitive data, run code, and perform other unwanted actions.

Batch request with unchecked failures

Unchecked failures can lead to data loss.

Disabled HTML autoescape

Disabling the HTML autoescape mechanism exposes your web applications to attacks.

Cryptographic key generator

Insufficient key sizes can lead to brute force attacks.

Unvalidated expansion of archive files

Expanding unverified archive files without controlling the size of the expanded data can lead to zip bomb attacks.

Unauthenticated Amazon SNS unsubscribe requests might succeed

Failing to set the AuthenticateOnUnsubscribe flag to True when confirming an SNS subscription can lead to unauthenticated cancellations.

File injection

Writing unsanitized user data to a file is unsafe.

Unverified hostname

Unverified hostnames lead to security vulnerabilities.

Sendfile injection

The software allows user input to control or influence paths or file names that are used in file system operations.

SQL injection

The use of untrusted inputs in a SQL database query can enable attackers to read, modify, or delete sensitive data in the database.

Header injection

Constructing HTTP response headers from user-controlled data is unsafe.

Origins-verified cross-origin communications

Unverified origins of messages and identities in cross-origin communications can lead to security vulnerabilities.

Insecure temporary file or directory

Insecure ways of creating temporary files and directories can lead to race conditions, privilege escalation, and other security vulnerabilities.

Loose file permissions

Weak file permissions can lead to privilege escalation.

Unsanitized input is run as code

Scripts generated from unsanitized inputs can lead to malicious behavior and inadvertently running code remotely.

Missing pagination

Missing pagination on a paginated call can lead to inaccurate results.

Inefficient polling of AWS resource

Custom polling can be inefficient and prone to error. Consider using AWS waiters instead.