Let’s Encrypt issues certificates of which they are the CA. That cert is based on a private key generated in the server by LE's auto/certbot script.
Could a state actor MITM that transaction requesting a cert and send down a spoofed cert in it's place which would appear valid on the surface? One which the state actor could make weaker and easier to crack?
Alternatively, could a state actor hijack the process to install LE's script in the first place, supplanting it with a script that requested a cert from a CA they controlled? Again, sending back a weak cert they could crack?
Most people just blindly install and run the script. They see a cert working, and move on. They don’t validate the chain themselves. This seems a potential weak point.
I think the private key which doesn't leave the server largely protects against this, but I am not certain if that's the case, hence this question.
So how secure is are those processes? Why are the considered secure? Could a MITM attack like this work based on user carelessness to validate the chain?