A web site that I jointly administer suddenly started to fail when trying to add images to pages/posts.
We’d not altered anything nor installed any new plugins, but this was disconcerting as Christmas was approaching and that’s a busy time for us.
It turns out the issue was caused by our host provider changing their security and WordPress was (to use their words) “violating mod_security settings”. Thankfully, they added an exclusion for us and things are up and running again (no lasting harm done).
So, if WordPress starts saying something like “Page not found” (404 error) when you attempt to publish a page or post, check with your hosting provider and see if they can change settings for you.
There’s also a WordPress support thread here on the issue: