Skip Menu |

This queue is for tickets about the Apache-Authen-Program CPAN distribution.

Report information
The Basics
Id: 40437
Status: new
Priority: 0/
Queue: Apache-Authen-Program

People
Owner: MLFISHER [...] cpan.org
Requestors: bitcard.org [...] munkynet.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.93
Fixed in: (no value)



Subject: Arbitrary command execution, probably
Username and password are not handled securely. Both passed by the client and should be considered tainted. (The password is only an attack vector when not using a passfile.) You do this: $cmd = "$program '$username' '$password' "; $cmd .= join(' ', @args); my @output = `$cmd`; Consider doing this instead: open(my $fh, "-|", $program, $username, $password, @args) or die "$program: $!\n"; my @output = <$fh>; close $fh; Another option would be to provide the program with the username and password on STDIN. On some systems this is also more secure than putting the password in a temporary file.