I recently bought an Warwick Rockbass 5 string used. It should be notet that I'm not a very experienced bass player.
I and the man I bought it from played it, and I didn't hear any buzzing there. When I got home and plugged it in, I discovered that the E string buzzed horribly.

From what I can hear, the buzzing is coming from the area around the nut by the tuning pegs. I'ts only when played open that the E string is really buzzing. It's still audible on 1st and 2nd fret, but disappears completely at 3rd fret and up. Only the E string is buzzing.

Is there anything I can do to fix this? I'm quite handy with tools, so I'm not afraid to do some work.
Note that I have no idea how long the string's been on the bass.

Thanks in advance
This is annoyingly common, and it can have a number of causes. The usual culprit is a loose string nut. Since those things have to be replaced from time to time, they are glued into the nut slot just barely, which makes removing them easier. This can lead to a loose nut, which will buzz at certain frequencies. It is an easy fix: a little more glue, but not too much! And for God's sake, don't use anything like Gorilla Glue or Krazy Glue or Titebond 50! You will probably live long enough to regret it!

Another cause can be strings that are too thin for the nut slots. Do the strings seem to sink too deeply into the nut slots? If so, the nut is cut for thicker strings. In this case, use heavier strings, or replace the nut to work with the thinner gauge strings.

Another problem can be a neck twist or bow. This is a truss rod issue, and can usually be corrected with a 1/4 to 1/2 turn of the truss rod nut. Have a good tech verify that it is a neck twist or bow problem. Sighting down the neck doesn't always reveal these conditions.

The final probably culprit - though not very likely - is a crack in the neck. Look for any visible cracks. This is rarely the cause, though.
"Maybe this world is another planet's hell?" - Aldous Huxley
I'm guessing it's not simply fretbuzz due to low action and too thick first/second frets? (Shouldn't be with quality bass like a warwick and a sensible setup.)
The first thing I'd check is measuring the neck relief with a feeler gauge and a capo. between the 1st fret and the fret approximately at the body joint, you should see about 0.5mm at the 7th fret. If there's very little gap or no gap at all, try loosening the truss rod and see if that fixes it.

Another very common problem is that the nut slot on the low E is simply cut too low, causing buzzing. In which case I'd return the bass and get another one if the retailer has a good return policy. It makes little sense to replace the nut to fix the issue if you can fix it for free by returning it.
Quote by Axelfox
Thanks for help everyone!
I managed to fix it with something as simple as new strings. I guess something was wrong with the originals that were on the bass when I bought it
I usually replace strings when I get a new instrument, especially basses. God knows how long they've been on there.
I like St. Anger. Ridicule me, daddy
Quote by The_Blode
^ I'm sorry your highness I forgot that I'm subhuman. . .

Quote by ErikLensherr
Quote by dspellman
Makes sitting annoying.

You could always remove your batteries.
"Maybe this world is another planet's hell?" - Aldous Huxley