If your washing machine is fairly new, it is possible it was not properly installed. The hose may be incorrectly attached or it could have bad plumbing that is causing it to fill with water that was meant to drain through sewer pipes. Check to see if water is trickling into the machine when it has not been running recently. If so, sewer water is filling the machine.
Broken Trap Seal
The seal inside plumbing fixture traps may be broken. This happens when the traps dry up, causing the water seal inside the trap to break. The water from any fixture can evaporate quickly if it is unused for a period of time.
Sewer gas leaks can be caused by cracks in vent pipes or drain lines. Vent pipe cracks leak large amounts of sewer gas and it is difficult to find the crack or determine the exact source. If there are air ducts near the washing machine, the smell may be coming through the ducts rather than from the machine.
If plumbing vent pipes are clogged by leaves, dirt or objects such as dog toys or tennis balls, sewer gas problems can occur. When a washing machine drains a substantial amount of water, the water entering the pipes can cause nearby sink or tub traps to drain. If there is a clog, sewer gas will then enter the room through the trap of the dry fixture.