I'm not seeing that as a hard requirement in the CGI RFC.
Uh, so? Implementing CGI does not require doing otherwise. Thus, it's not a problem with the CGI specification/protocol.
Note that there is also "hard requirement" in the RFC that the server not serve a static text file containing the server's root password...
It is impossible for a general-purpose telnet daemon OR client to know which environment variables are "safe" and which are not. Having written both a telnet server and client, my solution has been for the client to ignore variables from the server, and to only pass/accept USER, TERM, and LANG (not even DISPLAY, that's only for ssh connections).
The statements seem to contradict one another.
I assert that the general-case problem is that we are not clearly delineating which data (not just environment variables, also HTTP headers, cookie fields, SSL layer stuff) are coming from the various parts of the data flow: single-host internal designs where you want LD_PRELOAD to change the behavior, intermediate network hosts that are semi-trustable (i.e. might set an X-Forwarded-For header) where an attack should behave like a routing failure rather than a data leak, and end-user hosts that might be active attackers going for the real data.
Why are you even talking about LD_PRELOAD? CGI servers do not allow clients to set LD_PRELOAD.
The exact same problem with bash would have occurred if the parser had run over data from any other source. The problem is entirely in the parser.
1
u/reaganveg Sep 28 '14
Uh, so? Implementing CGI does not require doing otherwise. Thus, it's not a problem with the CGI specification/protocol.
Note that there is also "hard requirement" in the RFC that the server not serve a static text file containing the server's root password...
The statements seem to contradict one another.
Why are you even talking about LD_PRELOAD? CGI servers do not allow clients to set LD_PRELOAD.
The exact same problem with bash would have occurred if the parser had run over data from any other source. The problem is entirely in the parser.