Is code injection possible in Java?

前端 未结 8 1985
谎友^
谎友^ 2021-02-04 07:17

nowadays you can read much about code injection, exploits, buffer-, stack- and heap-overflows etc. leading to inject and run code. I wonder what of this stuff is relevant for Ja

8条回答
  •  梦如初夏
    2021-02-04 07:34

    Unless you are doing weird things on the server (like dynamically generating code, etc), it is impossible to bo vunerable for code injection.

    Although I can think of an (ugly) situation where the application dynamically creates a JSP based on user input. That JSP will be translated to Java code, which is being compiled to byte-code by the web container, and then executed. This could introduce an injection point. But generating JSP's dynamically normally doesn't make any sense.

提交回复
热议问题