1. Home
  2. Security Hardening
  3. CIS Nginx Benchmark V1.0.0 L1 Proxy
  4. Ensure the maximum buffer size for URIs is defined

Ensure the maximum buffer size for URIs is defined

Details

The large_client_header_buffers directive defines the number and size of buffers used within the URI. A request cannot exceed the size of this buffer when this directive is configured. The large_client_header_buffers directive should be set to restrict buffer usage. The number of buffers should generally set to two and the length be set to 1K; however, this may not be a good fit for your application and may need to be set differently.

Rationale:

The large_client_header_buffers directive may assist in preventing buffer overflow attacks that leverage long URI query parameters.

Solution

Open your nginx.conf file and locate your server or HTTP blocks. This may be added to the HTTP block for all configurations or the server block for more specific configurations to meet your needs. Add the below line to implement this recommendation:

large_client_header_buffers 2 1k

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Configuration Management.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles