Skip to content

Commit

Permalink
Taint mode blocks vulnerability
Browse files Browse the repository at this point in the history
If filename is `ARG`, the while loop will call `open()` on every thing in `@ARG` creating a remote execution vulnerability. Enabling taint mode prevents this. See my [article](http://perltricks.com/article/netanel-rubins-perljam-circus/http://perltricks.com/article/netanel-rubins-perljam-circus/) for details.
Another way to fix would be to use the double diamond operator `<<$file>>` will not call `open()`. But it requires Perl 5.22.0 or higher, which most people won't have.
  • Loading branch information
David Farrell committed Mar 1, 2016
1 parent c227b04 commit d0497db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/file_upload.cgi
@@ -1,4 +1,4 @@
#!/usr/bin/env perl
#!/usr/bin/env perl -T

use strict;
use warnings;
Expand Down

0 comments on commit d0497db

Please sign in to comment.