Skip to main content

Built-in Protection

Rule Engine JS has security features enabled by default:

Prototype Protection

Blocks proto and constructor access

Function Blocking

Functions cannot be accessed via paths

Depth Limits

Prevents infinite recursion attacks

Type Validation

Validates operator arguments

Prototype Pollution

What It Is

Malicious path access that modifies object prototypes.

How We Block It

Configuration

Never set allowPrototypeAccess: true in production! It opens critical security vulnerabilities.

Input Validation

Always validate user input before using in rules.

Bad vs Good


Whitelist Operators

Only allow specific operators in user-defined rules.

Whitelist Paths

Restrict which data paths can be accessed.

Rate Limiting

Prevent DoS via excessive evaluations.

Depth Limits

Prevent deeply nested rules (DoS).

Sensitive Data

Don’t expose sensitive data in error messages.

Regex Safety

Prevent ReDoS (Regular Expression Denial of Service).

Complete Security Checklist


Secure Configuration


RuleEngine API

Configuration options

Performance

Performance best practices