Lua? Tcl? both AFAIK have less vulnerabilities than PHP likely thanks to smaller code size.