It is illegal to keep a misdelivered package if the package has someone else's address and name on the package as that would be considered theft.
Although if your address was on the package then it's not illegal to keep the package.
But any mail or package that has someone else's name and address on it is illegal to keep or open and must be returned to the shipping company such as USPS, FedEx, UPS or Amazon.
Keeping a USPS package or mail that has someone else's name and address on it that was misdelivered is illegal to keep as it's considered mail theft and is a federal offense that can get you fines and even 5 years in prison.
It's not illegal to open a package that was sent to your address but not your name if it was part of a brushing scam or other scam.
Although if the package was ordered by someone else and your address was entered on the shipping label accidentally then you should try to get the package delivered to the correct person.
However it's not really illegal to open it if it arrived at your address.
If you do happen to get a package at your address and it's not your name, you should try and look up the name and see if they live near you and if so you can either deliver the package to their address yourself or let the shipping company know such as UPS, Amazon or USPS, FedEx etc.
When you receive a package with your address but a different name it could be that your address was entered by accident when someone else ordered something and it got delivered to your address.
Or it could also be that you received the package with your address but a different name due to a brushing scam or other fraud.
A brushing scam is when sellers use your address and ship packages to you that you didn't order and then they may use a different name to post positive reviews that are fake to increase their sales.
Other scams may use your address to also test stolen credit card numbers and may also have packages that contain stolen goods or items sent to and delivered to your address for later pickup.
First check to find out if it may have been misdelivered, but if it's a brushing scam you can keep the package and don't have to return it.
But if it was just a mistake that someone entered your address instead of their own then the package should be returned if possible.
To report brushing scams to Amazon, log into your Amazon account and then go to the "Report a scam" or "Report Suspicious Activity" section, then look for the link for "Report an unwanted package" or Report a scam".
Then click on the "Report Unsolicited Package or Brushing Scams".
Then fill out the self service form to report the unwanted package.
Provide details like the number of unwanted packages you have received, a tracking number from at least once of the packages from the brushing scam, a photo of the shipping label, "although the photo of the shipping label is optional" and any other additional information which can be useful.
If you can't find the form online to report the brushing scam to Amazon you can also contact Amazon Customer Service and report it.
If you do get a package through a brushing scam from Amazon you do not have to return the package and you can keep the package.
Amazon will investigate the report and take any needed action against the seller that sent the package for the brushing scam.
Amazon may also suspend or remove the seller's privileges and even withhold payments.
Amazon's customer service phone number is 1-888-280-4331.