No you cannot vent your bathroom exhaust fan into the attic.
Bathroom echaust duct in attic.
You should never exhaust the bathroom fan directly into the attic.
When bathroom exhaust ducts are not properly insulated and vented the warm moist air traveling through them hits the colder section of the duct in the unconditioned attic space causing condensation on the duct work.
These ducts should be insulated or replaced with pre fab insulated ductwork or flexduct and a better installation would have shortened that very long duct as much as.
It may also violate a shingle warranty.
That condensation drips from the duct work in the attic space and the exhaust fan.
If you re not comfortable working on a ladder call a professional for help.
When venting a bathroom exhaust fan make sure to vent the air to the outside rather than into your attic where it can cause mold and mildew to form.
Our photo above shows a long routing of bath vent fan ducts across an attic floor to an exit at the building soffit or eaves and the condensation of moisture in such vent lines.
An insulated duct will help prevent condensation when the warm air from the bathroom meets the cold duct in the attic.
Bathroom exhaust fans perform an important function by removing excess moisture from your home.