in reply to Re^2: eval() and security
in thread eval() and security

I did not mean it as a literal runnable example, or I would have put it in code tags.

The key point is that you can run arbitrary code (provided it parses) inside a regex match. If you allow user data into the regex match, then the sky is the limit for exploits. (As anonymonk shows above, Taint mode is smart enough to hate that sort of thing)

Replies are listed 'Best First'.
Re^4: eval() and security
by Anonymous Monk on Nov 24, 2009 at 17:59 UTC
    also there are regex patterns which will run forever, and there have been some that will overflowed buffers...

      and there have been some that will overflowed buffers...

      The switch to a non-recursive engine in 5.10 should have fixed that.

Re^4: eval() and security
by halfcountplus (Hermit) on Nov 24, 2009 at 18:07 UTC
    The key point is that you can run arbitrary code (provided it parses) inside a regex match.

    I have thought this too, but in fact I cannot make it happen for all my trying, and I have never seen any security advisories about it, nor kind I find any examples of such a thing.