Project

General

Profile

Actions

Bug #8122

open
AI JI

lua/output: improve handling of lib loading

Bug #8122: lua/output: improve handling of lib loading

Added by Ambre Iooss 9 months ago. Updated 10 days ago.

Status:
Assigned
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Since Suricata 8, external Lua modules must be explicitly whitelisted (e.g. lua.cpath=/usr/lib/lua/5.4/?.so).

It turned out that it is possible to bypass this security using the following in a Lua script setup function:

package.path = package.path .. ";/usr/share/lua/5.4/?.lua;/usr/share/lua/5.4/?/init.lua" 
package.cpath = package.cpath .. ";/usr/lib/lua/5.4/?.so" 


Files

reproducer.tar.gz (911 Bytes) reproducer.tar.gz Ambre Iooss, 11/19/2025 03:37 PM
Actions

Also available in: PDF Atom