It is possible to filter updates where the AS_PATH length exceeds a maximum value. The command for Cisco is:
There have been bugs in the past that caused issues when receiving excessively long AS paths, by misconfiguration or exploitation. It is normal to only see 5 or so ASs in an AS path and at most you could see 10-20 if an ISP is doing excessive AS_PATH prepending, so it would not be unreasonable for ISPs to filter at 50 or less.
Recommendation is to filter on AS_PATH length, but doesn’t provide a recommended length.
See (page 58)
Or (page 27)
The bug should be patched now, so there is less need, but it does still add to router memory requirements to receive excessively long AS_PATH and maybe the people doing the excessive prepend need to learn the hard way and have their routes dropped.
There is also evidence here that some major ISPs are not filtering