Cleaning the hoses and the valve ontop of the valve cover (PCV or CCV can't remember which one YJs have). The one closest to the firewall needs to be cleaned with brake cleaner and a paperclip as it gets clogged and causes the crank case pressure to exit out the airbox tube.
This fixed the oil in the airbox problem for me anyway and many people I know. If the problem persists after cleaning the vents then you have a worn motor with severe blowby. Some people make a threaded catch can to run the vents into instead of the airbox. Oil collects in the can instead of your air filter. It would take forever to fill up the can but it doesn't take much to gum up an air filter.