Yes, unethical use of open source assets is an ethical problem. However:
- Licenses that say “don't do illegal stuff” won't stop criminals from doing illegal stuff.
- Unwanted behaviour is really hard to define, to the point that the definitions might be too vague to be enforceable.
- Excluding specific groups is a very blunt instrument. E.g. allowing everyone except the government of a certain country to use some software would continue punishing that country after the government has changed.
- Hopefully, the good that comes from Open Source outweighs the bad uses.
The Free Software Definition and the Open Source Definition both emphasize that the software must be free to use for all purposes, without excluding anyone. However, all licenses do express the values of their drafters. For example the GPL expresses the belief that software freedom is ethically mandated, and the Cryptographic Autonomy License expresses the belief that end users should have control of their data in SaaS scenarios.
In contrast, the Ethical Source folks suggest licenses that directly exclude purposes or groups for ethical arguments, despite the problems mentioned above.
I believe that licensing is the wrong layer to address ethical issues in the open source community. It is unreasonable to believe that we can create software in a manner that only benefits the right people. However, we can run projects in an ethical fashion. Ethical artefacts vs ethical processes and communities.
It is also worth considering whether a certain software is even worth creating: a sysadmin tool like Chef is going to have way more neutral than bad uses, whereas the societal consequences for working on facial recognition or deep fakes are much darker on average.
Whether a developer is legally liable for the uses of the stuff they publish depends on what they are publishing, and what the applicable laws are. In general, it is impossible to disclaim all liability. For example, building an application that's purpose-built to commit copyright infringement is clearly contributing to that infringement. Publishing malware treads a very fine line between giving tools to red teams to improve security on one hand, and providing cyber-munitions to terrorists on the other. Your 3D printed gun example is close to the Liberator from Defense Distributed. While one open source advocate (ESR) has lauded this gun, it may be worth pointing out that his views have diverged from the FOSS mainstream.