Fellow student asked question from take-home exam on Stack Exchange In an advanced university course on computer science and problem solving, one of my fellow students asked for a solution to a home exam on one of the Stack Exchange sites. The question he asked is taken directly from the exam without modification also stating that this is practice question for the upcoming exam. He got the solution. There was more than one question.

The professor always creates questions that are unique. It clearly states that questions on the exam must only be directed to the professor himself.

Now for the moral dilemma. I feel very uneasy about reporting although knowing that it will hurt future students and in the long term the status of the school. Will it affect me? Most likely not. 

I would like input on how others would reason about this.
Let's be clear here. From your description, the student clearly cheated by violating the take-home exam's stated policy that (quoting from your comment on @user2768's answer) "it is prohibited to ask anyone for an answer". Thus, your question reduces to the generic question of "should I report a fellow student who cheated?", to which the answer is "yes", as discussed endlessly on many previous questions on this site, e.g.:

Is it okay to report classmates cheating on exams?

Is it reasonable to report another student for cheating when it has no impact on me?

When is it acceptable to report classmates who cheat on an exam?

Should I report cheating to my professor? If so, how?

One can debate (as some here are doing) the viability of take-home exams as an assessment tool, since such exams create relatively easy opportunities for cheating, but that is besides the point. The student cheated, and should be reported. The "moral dilemma" you are referring to is a completely bogus one created by the outdated cultural conditioning that exists in many societies according to which "ratting people out" for bad behavior is morally wrong -- see my analysis of this issue in this answer.

Edit: I noticed that you wrote in a comment that “his account is filled with questions related to assignments in different courses”. Thus, he is not just a cheater, he is a serial cheater, which makes the case for reporting him much stronger. I suggest saving evidence of his cheating (screenshots etc) before reporting to prevent him from hiding his wrongdoing by deleting the questions.